CJCoding With Joseph
15free / daySign inCreate account

Weekly Pay Slip

Write a program with no input that prints a weekly pay slip. Declare, with type hints, the employee name Giselle, the hours worked 38.0, the hourly rate 18.75 and the deduction rate 0.2, then compute three typed floats: the gross pay (hours times rate), the deductions (gross times the deduction rate) and the net pay (gross minus deductions). Print the words Pay slip for and the name as two values with end= set to two newlines so a blank line follows; then Hours worked with a colon, the hours to one decimal using :0.1f, the word at, the rate to two decimals and the words per hour; then Gross pay and Deductions each with a colon, a space and the amount to two decimals using :0.2f; then a ruler of 24 equals signs made with the * operator; then Net pay with a colon, a space and the net amount to two decimals. Input: none.

Expected Output:

Pay slip for Giselle

Hours worked: 38.0 at 18.75 per hour
Gross pay: 712.50
Deductions: 142.50
========================
Net pay: 570.00

= 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.