subject

The code below takes the list of country, country, and searches to see if it is in the dictionary gold which shows some countries who won gold during the Olympics. However, this code currently does not work. Correctly add try/except clause in the code so that it will correctly populate the list, country_gold, with either the number of golds won or the string "Did not get gold". 1
2 gold = {"US":46, "Fiji":1, "Great Britain":27, "Cuba":5, "Thailand":2, "China":26, "France":10}
3 country = ["Fiji", "Chile", "Mexico", "France", "Norway", "US"]
4 country_gold = []
5
6 for x in country:
7 country_gold. append(gold[x])
8 country_gold. append("Did not get gold")

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
In the film "epic 2015," epic is the name for:
Answers: 3
question
Computers and Technology, 22.06.2019 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 25.06.2019 05:10
Create a console project in c#. 1. create an interface "imyinterface.cs" - add a method "string imessage()" 2. create a class named "c1.cs" - add 4 private data members, create property for each data member double loanamnout=0.0; double years=0.0; double interests=0.0; double interestrate=0.0; 3. - add a constructor with parameters to assign values to loanamnout, years, interestrate with values that user entered. 4. - add one method “payinterests()” to return the interests interests = loanamnout * interestrate * years 5. - inheritate "imyinterface", implement the method " imessage()", return string "be ready! ” 6. in program.cs, have users to enter loanamnout, years, interestrate. - call method payinterests() to display total interests. - call imessage() to display "be ready! ”
Answers: 3
question
Computers and Technology, 25.06.2019 05:30
The police department is excited to have some new motorcycle units. one officer said that these motorcycles can go from 0 miles per hour to 80 miles per hour in just 6 seconds. the officer is describing the motorcycle's a. average speed. b. distance. c. average velocity. d. acceleration.
Answers: 1
You know the right answer?
The code below takes the list of country, country, and searches to see if it is in the dictionary go...
Questions
question
Mathematics, 13.11.2019 10:31
question
Social Studies, 13.11.2019 10:31
question
Mathematics, 13.11.2019 10:31
question
Mathematics, 13.11.2019 10:31
question
Mathematics, 13.11.2019 10:31
question
Computers and Technology, 13.11.2019 10:31
Questions on the website: 13722361