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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:00, brookerebman15
Which type of tab stop is most for weights and measurements?
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, cireland
Write a program that inserts the digits of an integer into an array in originalorderfollowed by reverse order. first, promptthe user to enter a positive integer(> 0). determine the number of digits of the integer. create a dynamically allocated integer arrayof a size twice the number of digits. now insert the digits in original order which will occupy half of the array. then, insert the digits in reverse order. finally, output thedigits in thearray. use at least two functions to organize your program.
Answers: 3
image
Computers and Technology, 23.06.2019 11:30, magicalpenguin48
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, qveenvslayin
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
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 in other subjects:

Konu
Social Studies, 11.10.2020 07:01
Konu
Computers and Technology, 11.10.2020 07:01
Konu
Mathematics, 11.10.2020 07:01
Konu
Mathematics, 11.10.2020 07:01