Write a loop that reads strings from console 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.

Respuesta :

Answer:

Below is the step by step taken for a loop that reads strings from console input where the string is either "duck" or "goose"

Explanation:

ducks = 0

bird = input('Please enter either duck or goose')

while bird != 'goose'

if bird == 'duck'

ducks+= 1

bird = input('Please enter either duck or goose')

print('The number of ducks entered is' ducks)

end.

RELAXING NOICE
Relax