Saving for a Phone
Python
15 pts
Saving for a Phone
Selam saves 200 Nakfa every month. She needs at least 1500 Nakfa.
Use a while loop to find out how many months she needs. Start with savings = 0 and months = 0. In each round, add 200 to savings and 1 to months. Keep going while savings is less than 1500. Then print both variables as shown.
Expected output:
Months: 8 Savings: 1600
Checklist
- Use a
whileloop that adds tosavingsand countsmonthsuntil the goal is reached. - Print the months and the savings.
🔑 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.
