Update the Wallet
Python
15 pts
Update the Wallet
Selam has 200 Nakfa in her wallet. Change the variable wallet using shortcut assignment operators, one line for each event:
- She earns 150 Nakfa (
+=). - She spends 80 Nakfa at the market (
-=). - She shares the money equally with her two sisters, so it is split into 3 parts. Keep a whole number with
//=.
Then print wallet. Expected output:
90
Checklist
- Change
walletwith+=,-=and//=, one line for each event, so it ends as the whole number 90. - Print
wallet.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
