Advertisement
jabela

whilewithbreak

May 11th, 2019
1,090
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. CowID = []
  2.  
  3. while True:
  4.     ID = input("What is the cow's ID code?")
  5.     if len(ID) == 3:
  6.         CowID.append(ID)
  7.         break
  8.     else:
  9.         print("Cow ID has been entered wrongly.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement