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, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 22.06.2019 20:10
Assume that minutes is an int variable whose value is 0 or positive. write an expression whose value is "undercooked" or "soft-boiled" or "medium-boiled" or "hard-boiled" or "overcooked" based on the value of minutes. in particular: if the value of minutes is less than 2 the expression's value is "undercooked"; 2-4 would be a "soft-boiled", 5-7 would be "medium-boiled", 8-11 would be "hard-boiled" and 12 or more would be a "overcooked".
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
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
Physics, 13.10.2020 01:01
question
Biology, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
question
Geography, 13.10.2020 01:01
Questions on the website: 13722360