AssignmentsWeek 01 · FoundationsApplication cost calculator
wk01.p7Practice exerciseWeek 01 · FoundationsOpen · due in week 1

Application cost calculator

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.

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.

  1. 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).
  2. Convert the count with int() and the fee with float().
  3. Calculate the total cost by multiplying them.
  4. Print three labelled lines: number of schools, fee per school, and total cost.
Bonus, if you're feeling brave
  • 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.

Example cell run
How many scholarships are you applying to? 5
Fee per application (USD): 80

Schools: 5
Fee per school: 80.0
Total cost (USD): 400.0

Where 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 lines

How we'll grade it

Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.

CheckWhat we look forPt
It runsAsks 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 rightTotal equals count multiplied by fee.1
Readable outputThree labelled lines a non-programmer could read.1
Ready?
Hand it in
You can submit a draft and revise later if you're not done.
Begin submission →