In: Computer Science
Python code:
#initializing total as 0
total=0
#looping from 1 to 5
for i in range(1,6):
#accepting number of bugs collected in each day
and adding it to total
total+=int(input("Enter the number of bugs
collected in day "+str(i)+" : "))
#printing Total number of bugs collected
print("Total number of bugs collected:",total)
Screenshot:
Input and Output: