Advertisement
macko9393

Untitled

Apr 21st, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. print ('hello world')
  2.  
  3. def fibonnaci():
  4. j = 1
  5. k = 1
  6. for i in range(0, 20):
  7. print(j)
  8. l = j
  9. j = j + k
  10. k = l
  11.  
  12. def powerof():
  13. for i in range(0, 20):
  14. print(i**2)
  15.  
  16. def poweroftwo():
  17. j = 2
  18. for i in range(0, 20):
  19. print(j)
  20. j = j*2
  21.  
  22. choice = int(input('Enter your choice: '))
  23.  
  24. if int(choice) == 1:
  25. fibonnaci()
  26.  
  27. if int(choice) == 2:
  28. powerof()
  29.  
  30. if int(choice) == 3:
  31. poweroftwo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement