Advertisement
timber101

LBOA_wk2_TracingLoops

Apr 28th, 2022
724
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None
  1. # challenge 26 page 47
  2.  
  3. y = 0
  4.  
  5. for x in range(0,4):
  6.     if x % 2 == 0: # testing if x is even, returns the remainder
  7.         y = x + 2 # as per the book
  8.         print(y)
  9.  
  10. print(x)
Advertisement
RAW Paste Data Copied
Advertisement