Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Bug Collector Mk2
- #Written before Mr. Southern Accent Video Guy showed us the pseudocode.
- #bragging.
- #That was a hashtag in addition to a comment.
- #I miss // comments.
- #set initial number of bugs.
- bugs_collected = 0
- #Repeat every day for 5 days.
- for x in range(5):
- #display what day it is.
- print("today is day ",x+1)
- #set a temporary value for number of bugs.
- bugs_collected_before = bugs_collected
- #How many bugs were collected today only?
- bugs_collected = int(input("How many insects did you collect today?"))
- #Add today's collection to the total of all previous days.
- bugs_collected = bugs_collected + bugs_collected_before
- #Tell the entomologist how many bugs he's got.
- print("You've collected a total of",bugs_collected,"insects.")
Advertisement
Add Comment
Please, Sign In to add comment