PYTHON CORE · LESSON 30
Update the dictionary.
Change the key. · about 12 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Dial the program. In the middle line, the key appears twice.
player = {"score": 2}
player["score"] = player["score"] + 1
print(player["score"])Open the editor for class workSolve it yourself
Create a game dictionary with a «points» key and a value of 3. Add 2 to the points, save the new meaning in the same dictionary and output it.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework