LU08.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/archiv/m319python/learningunits/lu08/loesungen/fibonacci.txt
  • Zuletzt geändert: 2024/03/28 14:07
  • von 127.0.0.1