Write a loop that reads strings from standard input, where the string is either "duck" or "goose". The loop terminates when "goose" is read in. After the loop, your code should print out the number of "duck" strings that were read.
1
Expert's answer
2016-10-21T12:58:08-0400
counter = 0while True:
line = input()
ifline == 'duck':
counter += 1
elif line == 'goose':
breakprint(counter)
https://www.AssignmentExpert.com
Comments
This works