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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 22:30
The output voltage of a power supply is assumed to be normally distributed. sixteen observations are taken at random on voltage are as follows: 10.35, 9.30, 10.00, 9.96, 11.65, 12.00, 11.25, 9.58, 11.54, 9.95, 10.28, 8.37, 10.44, 9.25, 9.38, and 10.85
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 08:20
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
question
Computers and Technology, 25.06.2019 00:30
Which type of cell references are locked and not automatically updated when it’s copied a)formula b)relative c)absolute d)worksheet
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
question
Biology, 07.12.2020 08:10
question
Mathematics, 07.12.2020 08:10
question
World Languages, 07.12.2020 08:10
question
History, 07.12.2020 08:10
Questions on the website: 13722363