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
  • Last modified: 2023/11/13 08:56
  • by 127.0.0.1