Code : Tout sélectionner
def fib(n): # write Fibonacci series up to n Print a Fibonacci series up to n
a, b = 0, 1
while a < n:
print(a, endl="\t" )
a, b = b, a+b
return Done
Auto-declared local variables : a,b
// Warning: endl,Done, declared as global variable(s). ...
// compiling fib
PD:
I think that the global endl system variable should not be shown as a warning.