CJCoding With Joseph
15free / daySign inCreate account

Tuition Receipt

Write a program that prints a six-line tuition receipt with no input. Declare, with type hints, the student name Giselle, the number of credits 4, and the cost per credit 312.5, then compute three typed floats: the subtotal (credits times cost), the tax (13 percent of the subtotal, that is the subtotal times 0.13) and the total (subtotal plus tax). Print: the words Receipt for and the name; a line of 20 dashes made with the * operator; Credits with a colon, the credit count, the letter x with a space on each side, and the cost per credit; then Subtotal, Tax and Total each with a colon, a space and its value. Every money value is shown with exactly two decimals using :0.2f, and every line uses an f-string except the dashes. Input: none.

Expected Output:

Receipt for Giselle
--------------------
Credits: 4 x 312.50
Subtotal: 1250.00
Tax: 162.50
Total: 1412.50

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
PrintingVariables
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.