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, 22.06.2019 03:20
Which of these is a benefit of social networking? oa. hiding your true identity from friendsob. avoiding talking to people in personoc. spending time with friends instead of studyingod. connecting with new people
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
What does the level 1 topic in a word outline become in powerpoint? a. first-level bullet item b. slide title c. third-level bullet item d. second-level bullet item
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
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
Chemistry, 30.09.2019 03:10