Question: Write a program to collect the following data from the user. Python 1) User last name 2) User First Name 3) Number of Hours worked.

Write a program to collect the following data from the user. Python

1) User last name

2) User First Name

3) Number of Hours worked.

4) hourly wage

Calculate the gross wage based on the formula:

Gross wage is number of hours worked multiplied by hourly wage Hint: You use the symbol * for multiplication.

Display the user name and gross wage.

You must ask the following questions in the exact order.

"What your last name: "

"What is your first name: "

"What is your hourly wage: "

"How many hours have you worked: "

You must spell the output messages to the user in the exact form as below and must be in the following order.

"Your first name is "

"Your last name is "

"Your wage is $"

If you don't spell your input messages and output messages as above, the auto-grader will fail your program. But don't worry, I will manually go over the first few homework and regrade them until you get a hang of it.

Here is the sample of input and output for one test case.

What your last name: 'Miller' What is your first name: 'John' What is your hourly wage: 40 How many hours have you worked: 50 Your first name is John Your last name is Miller ('Your wage is $', 2000)

To generate the above input/output, you would need python statements as below, The highlighted text below are variables. For more details on how to use input/output statements that can pass Mimir test, please watch all the videos in module before attempting the homework.

print("Your first name is " + userNameFirst) print("Your last name is "+userNameLastName) print("Your wage is $",wage)

If the mimir is expecting the wage to be displayed in different format such as below,

Your wage is $2000

then, you would need to modify the print statement as below:

print("Your wage is $" + str ( wage ) )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!