Advertisement
OreganoHauch

if loop

Apr 3rd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def if_loop1(i,N):
  2. if i != N+1:
  3. print(i)
  4. i += 1
  5. loop(i,N)
  6. if_loop1(0,10)
  7.  
  8.  
  9.  
  10. def if_loop2(N):
  11. i = 0
  12. def loop():
  13. if i != N+1:
  14. print(i)
  15. i += 1
  16. loop()
  17. loop()
  18.  
  19.  
  20. if_loop2(10)
  21.  
  22. def if_loop3(N):
  23. def loop():
  24. i = 0
  25. if i != N+1:
  26. print(i)
  27. i += 1
  28. loop()
  29. loop()
  30.  
  31.  
  32. if_loop3(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement