CodeAgeBy Sitezack
Python for ProsFundamentals0 XP
Chapter progress0/5

Lesson 5 of 5

Wrap-up exercise

Combine variables, arithmetic and f-strings in a short script that produces an exact output.

This is the basic shape of every program: input data, a computation, a formatted output.

🎯 Exercise

A subscription costs €6.99 per month (variable monthly provided). Compute yearly = monthly * 12, rounded to 2 decimals, then print the yearly total in a sentence containing its value (83.88).

main.py
Loading editor…
Loading Python…

Output

Run your code to see the result here.