Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates an employee's weekly income based on the number of hours worked, and their hourly pay as follows: Ask the user

Write a program that calculates an employee's weekly income based on the number of hours worked, and their hourly pay as follows:
Ask the user to enter their name. Save this into a variable. Name it properly.
Ask the user to enter their hourly rate. Show them a prompt that looks like the following: Sarah, what is your hourly rate?
Replacing Sarah for their atual name which you got in step 1.
Save the hourly rate in a variable and note you should convert the into to a floating point number.
Ask the user to enter their total hours for the week. Use their name as you did in step 2 when using input. Save the answer into another variable. The input of this step should be converted into an integer.
Calculate the total wages for the employee and save the result in a variable.
Show the result, using the output that resembles the following:
Sarah, your check for this week should be $x.y
where Sarah should be replaced by the user's actual name and x.y is the total amount of the wages as a floating point number.
It is important to: use variables to get input, think of the proper data type for each input, and produce the proper output.
Use conversions when needed and do not add conversions if not needed as this causes point deductions.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

Describe effectiveness of reading at night?

Answered: 1 week ago

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago

Question

3. Is it a topic that your audience will find worthwhile?

Answered: 1 week ago

Question

2. Does the topic meet the criteria specified in the assignment?

Answered: 1 week ago