subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
You know the right answer?
Create a python program to calculate the total number of gold medals won by your country at the (ent...
Questions
question
Mathematics, 23.02.2021 21:50
question
Spanish, 23.02.2021 21:50
question
Law, 23.02.2021 21:50
question
Mathematics, 23.02.2021 21:50
question
Mathematics, 23.02.2021 21:50
Questions on the website: 13722363