LU99.L02: Fibonacci-Folge

def main():
    position = int(input(''))
    number1 = 0
    number2 = 1
    counter = 3
    while counter <= position:
        next_number = number1 + number2
        number1 = number2
        number2 = next_number
        counter += 1
 
    print(number2)
  • modul/m319/learningunits/lu99/loesungen/fibonacci.txt
  • Zuletzt geändert: 2024/03/28 14:07
  • von 127.0.0.1