Advertisement
jabela

While No Break

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