What you'll build
Ask how many scholarships you're applying to and how much each application costs. Multiply them. Print the total in a clean three-line summary. First time mixing int() and float() in one program.
Requirements
The must-do parts. If any are missing, we'll ask you to take another pass.
- Ask the user for the number of scholarships they're applying to (a whole number) and the fee per application in US dollars (can have a decimal).
- Convert the count with
int()and the fee withfloat(). - Calculate the total cost by multiplying them.
- Print three labelled lines: number of schools, fee per school, and total cost.
- Print a fourth line showing the total in Ghana Cedis using a fixed rate of 15.5 GHS per USD.
- Ask for a courier cost per application and add it to the per-application fee before multiplying.
Examples
What your program should look like when it runs. Lines starting with $ are typed by you; the rest is your program.
How many scholarships are you applying to? 5
Fee per application (USD): 80
Schools: 5
Fee per school: 80.0
Total cost (USD): 400.0Where to start
Copy this scaffold into a new file. You don't have to use it — it's just a friendly nudge.
# Application cost calculator
count_text = input("How many scholarships are you applying to? ")
fee_text = input("Fee per application (USD): ")
# TODO: convert count_text to int and fee_text to float
# TODO: calculate the total cost
# TODO: print three labelled linesHow we'll grade it
Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.
| Check | What we look for | Pt |
|---|---|---|
| It runs | Asks both questions and prints three labelled lines without errors. | 1 |
| Conversions are right | `int()` is used for the count and `float()` for the fee. | 1 |
| Math is right | Total equals count multiplied by fee. | 1 |
| Readable output | Three labelled lines a non-programmer could read. | 1 |