Computer Science, asked by Ok4334, 10 months ago

I NEED HELP PLS. I NEED HELP PLSI NEED HELP PLSI NEED HELP PLSI NEED HELP PLSI NEED HELP PLSI NEED HELP PLSI NEED HELP PLS.

you are to create a Python program to calculate the total number of gold medals won by your country at the (entirely fictitious) 2017 Olympic Games in Antarctica. The requirements for the program are as follows:
 Ask the user to input the name of the country you’re counting the medals for.
 You will need to use a loop structure to input the gold medals your country has won in a number of sports. You can do this in one of two ways, and you can decide which to use. Either:
o Use a WHILE loop that asks the user if they wish to add another sport every time it runs, or
o Ask the user how many sports they wish to submit medals for, assign the input to a variable and then use a FOR loop to repeat the correct number of times.
 Ask the user to enter the name of a sport. Then ask them how many gold medals the country has won in that sport.
 If using a FOR loop, this should just carry on to the next sport. A WHILE loop will ask if there are more sports to add (you should add at least three). If the answer is Y, continue.
 When the FOR loop ends (or the user replies N if using a WHILE loop), the program should calculate the total number of gold medals won.
 The program should print out a message including the name of the country and the number of gold medals.

Answers

Answered by vamanmadhavan10
0

Answer :

Explanation:

Watch out while using the 'while' syntax.You have to use a 'break' statement or else your statement will keep returning infinitely because it's an infinite loop.

Attachments:
Similar questions