subject
Computers and Technology, 29.07.2020 06:01 Jasten

1 #In the Pokemon video game series, every Pokemon has six 2 #stats: HP, Attack, Defense, Special Attack, Special Defense,
3 #and Speed.
4 #
5 #Write a function called total_stats that will take as input
6 #a list of dictionaries. Each dictionary will have seven
7 #key-value pairs:
8 #
9 # - name: a Pokemon's name
10 # - hp, attack, defense, special attack, special defense,
11 # and speed: an integer representing that Pokemon's stat
12 # in that category
13 #
14 #Your function should return a single dictionary. The keys
15 #of the dictionary should be the Pokemon names from the
16 #original list, and the values should be the _total_ stats
17 #for each Pokemon (add HP, Attack, Defense, Special Attack,
18 #Special Defense, and Speed).
19 #
20 #For example, if this was one of the dictionaries in the #original list:
21 #
22 #{"name": "Bulbasaur", "hp": 45, "attack": 49, "defense": 49,
23 #"special attack": 65, "special defense": 65, "speed": 45}
24 #
25 #Then one of the key-value pairs in the dictionary you
26 #return would be: "Bulbasaur": 318 (45 + 49 + 49 + 65 + 65 +
27 #45 = 318).
28
29
30
31 #Add your function here!
32
33
34
35 #Below are some lines of code that will test your function
36 #You can change the value of the variable (s) to test your
37 #function with different inputs.
38 #
39 #If your function works correctly, this will originally
40 #print (although the order of the keys may vary):
41 #{' Bulbasaur': 318, 'Charmander': 309, 'Squirtle': 314)
42 starters [f"name""Bulbasaur", "hp": 45, "attack": 49, "defese" 49, "special attack": 65, "special defense": 65, "speed" 45, "special defense": 50, "speed 65, "special defense 64, "speed": 43) ]
43 {"name" : "Charmander", "hp": 39, "attack": 52, "defense 43, "special attack": 60, f"name": "Squirtle", "hp":
44, "attack": 48, "defense": 65, "special attack": 50,
45 print (total stats (starters))

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, ahmedislife
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
image
Computers and Technology, 22.06.2019 10:50, Isaiahtate053
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
image
Computers and Technology, 22.06.2019 18:10, AdoNice
How can i delete permalinks from a word press site?
Answers: 1
image
Computers and Technology, 23.06.2019 09:00, amberpublow7
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
You know the right answer?
1 #In the Pokemon video game series, every Pokemon has six 2 #stats: HP, Attack, Defense, Special A...

Questions in other subjects:

Konu
Health, 13.10.2020 08:01
Konu
Computers and Technology, 13.10.2020 08:01
Konu
Mathematics, 13.10.2020 08:01