← Back to User Input
Question 195
Weekly Pay
Weekly Pay
Ask for an hourly rate with the prompt Hourly rate? and the hours worked with Hours this week? (each ending in a space), convert both with float(), then print two lines with two decimals each using :0.2f: Pay: <rate times hours> and Per day: <the pay divided by 5>. Input: two lines, one number each. The prompts are part of the output and input() stays on the same line, so both prompts and the Pay line share the first output line, as shown in Expected Output.
Expected Output:
Hourly rate? Hours this week? Pay: 740.00 Per day: 148.00
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
User Input
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.