# Chapter3_for.py # for i in range() Chapter3 page 87 # break / continue usages # for x in ys Chapter6 data sets # Chapter 3 examples for the for keyword for i in range(10,20): # default increment = 1 # test to see if i is a perfect square, if yes break, else continue with the loop s = i ** 0.5 if s.is_integer(): print(f"{i} is a perfect square, that will cause a break in this loop, unless you want to continue.") choice = input("Do you want to continue? (yes/no): ").lower() if choice == "no": break # breaks out of the for loop else: # optional continue print(i) # the loop does NOT include the stop int