Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CowIDs <- []
- MilkYield <- []
- loopone <- True
- looptwo <- True
- loopthree <- True
- D1S1 <- []
- D1S2 <- []
- D2S1 <- []
- D2S2 <- []
- D3S1 <- []
- D3S2 <- []
- D4S1 <- []
- D4S2 <- []
- D5S1 <- []
- D5S2 <- []
- D6S1 <- []
- D6S2 <- []
- D7S1 <- []
- D7S2 <- []
- i= 0
- #Task 1
- NumOfCows <- int(input("How many cows are in your herd"))
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D1S1.insert(c, CowYield)
- ENDFOR
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D1S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D2S1.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D2S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D3S1.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D3S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D4S1.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D4S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D5S1.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D5S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D6S1.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D6S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D7S1.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowIDs
- ENDWHILE
- ENDFOR
- for i in range(NumOfCows): # This loop will repeat for the number of cows in the herd
- while loopone = True:
- CowID <- input("Please enter Cow identification code")
- ENDIF
- try:
- val <- int(CowID) # Checks IF Userinput is a Integer
- ENDIF
- except ValueError:
- OUTPUT "That's not a valid identification code!"
- ENDIF
- loopone <- True # Restarts Loop instead of quitting program
- IF len(CowID) = 3: # Checks IF ID is 3 digits long
- for b in range(len(CowIDs)):
- IF CowID = CowIDs[b]:
- OUTPUT "this has been entered before"
- ENDFOR
- loopone <- True
- ENDIF
- ENDIF
- ENDFOR
- CowIDs.insert(i, CowID)
- for c in range(NumOfCows):
- CowYield <- input("Please enter the yield for cow:"+ CowID)
- ENDFOR
- D7S2.insert(c, CowYield)
- ENDFOR
- OUTPUT "End of day one"
- del CowID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement