GregroxMun

Bug Collector MkII

Sep 13th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #Bug Collector Mk2
  2. #Written before Mr. Southern Accent Video Guy showed us the pseudocode.
  3. #bragging.
  4. #That was a hashtag in addition to a comment.
  5. #I miss // comments.
  6.  
  7. #set initial number of bugs.
  8. bugs_collected = 0
  9.  
  10. #Repeat every day for 5 days.
  11. for x in range(5):
  12. #display what day it is.
  13. print("today is day ",x+1)
  14.  
  15. #set a temporary value for number of bugs.
  16. bugs_collected_before = bugs_collected
  17.  
  18. #How many bugs were collected today only?
  19. bugs_collected = int(input("How many insects did you collect today?"))
  20.  
  21. #Add today's collection to the total of all previous days.
  22. bugs_collected = bugs_collected + bugs_collected_before
  23.  
  24. #Tell the entomologist how many bugs he's got.
  25. print("You've collected a total of",bugs_collected,"insects.")
Advertisement
Add Comment
Please, Sign In to add comment