我试图避免for循环,并尝试使用这个主题中被接受的答案:How do I replace while loops with a functional programming alternative withoutconst sumFibs = num => { let m = n
while (m > num - x.length
我写了一个函数来生成第一个n斐波那契数。但是,它一直在循环;我想让它停止,并让用户选择计算另一个斐波那契数序列。如果用户进入-1,进程应该退出。programfib = int(input("Input a number to get its Fibonacci sequence: "))
while