Advertisement
KodingKid

All (I think) ways of doing a while loop using 2 variables in Python - Basic Scripting #23

Jun 1st, 2021
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. a = 1
  2. b = 2
  3. while (a < b):
  4.     print("This is a loop")
  5.     break
  6. while (1 < 2):
  7.     print("This is a loop")
  8.     break
  9. while (a < 2):
  10.     print("This is a loop")
  11.     break
  12. while (1 < b):
  13.     print("This is a loop")
  14.     break
  15. while (b > a):
  16.     print("This is a loop")
  17.     break
  18. while (2 > 1):
  19.     print("This is a loop")
  20.     break
  21. while (2 > a):
  22.     print("This is a loop")
  23.     break
  24. while (b > 1):
  25.     print("This is a loop")
  26.     break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement