print("To use this program, you will need to edit this code to be able to run it with your inputs.") print("The line of code you will need to edit is line 10.") print(" ") print(" ") #_____________________________________________________________________________________________________________ a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] n = 0 #-------------------------------------------Choose what number in the list to start with. (0=1st number, 1=2nd number, 2=3rd number etc.) xMax = 5 x = int(a[n]) while (x < xMax): print(x) n += 1 x = int(a[n]) else: print("You cannot print any more numbers as they are not less than five.") #_____________________________________________________________________________________________________________
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question