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 17:00
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
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
Mathematics, 10.12.2019 06:31
question
Mathematics, 10.12.2019 06:31
question
French, 10.12.2019 06:31
question
Mathematics, 10.12.2019 06:31
question
Mathematics, 10.12.2019 06:31
Questions on the website: 13722362