Guest User

Untitled

a guest
Jun 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #Assingment Program three: How many eggs?
  2. #Filename:
  3. #Author: Robert Alan Parker
  4. #Version 1.0
  5.  
  6.  
  7. number_in = input("How many eggs do you have?")
  8. eggs = int(number_in)
  9. except: ErrorValue
  10.  
  11.  
  12. #boxes filled = a#
  13. a = eggs/6
  14.  
  15. #number of eggs left over#
  16. b = eggs%6
  17.  
  18. if a >= int(1):
  19. print "You have enough eggs to fill " + str(a) + " boxes and " + str(b) + " eggs left over"
  20. elif eggs == float:
  21. print "Please enter an integer value, you cannt have half an egg!"
  22. else:
  23. print "Unfortunately you do not have enough eggs to fill any boxes and happen to have " + str(b) + " eggs left over."
Add Comment
Please, Sign In to add comment