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 01:50
A.) generate scaffolding to create database for your application. develop all the entities identified in assignment #2. add any additional that may be identified later. b.) add data validation rules to the models that are appropriate for your application and data. c.) create links for each scaffold in the header section. part 2: application updates [30 points] a.) add two additional views to the "home" controller you created in assignment #1. b.) the two views should be named as “privacy" and "". c.) link the two newly created views in the footer section. hint: you would need to modify the “home" controller definition and create “privacy.html.erb" and “.html.erb" files in appropriate locations.
Answers: 3
question
Computers and Technology, 22.06.2019 08:30
Active listen eliminates barries to communication true or false
Answers: 1
question
Computers and Technology, 22.06.2019 12:40
The most complicated four letter word
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
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
Health, 21.04.2021 22:20
question
Mathematics, 21.04.2021 22:20
question
Social Studies, 21.04.2021 22:20
question
Mathematics, 21.04.2021 22:20