Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program using IDLE script. When completed upload your .py file. Use comments for your name, course name, program name, today's date in

Write a Python program using IDLE script. When completed upload your .py file.

Use comments for your name, course name, program name, today's date in the header.

Hint: Variables with no fraction values are integers. Variables with fraction values to account for decimal places in the program are float.

Use the constant variable format for the overtime rate initialized to 1.25 number value.

Input employee's name into string variable called emp_name.

Input regular hours worked into variable accepting fractions. Variable called reg_hrs.

Input overtime hours worked into variable accepting fractions. Variable called ot_hrs.

Input the regular hourly pay rate into variable accepting fractions. Variable called reg_pay_rate.

Calculate the overtime houly pay rate into variable called ot_pay_rate. Use formula reg_pay_rate multiplied by the overtime rate constant variable.

Calculate regular pay into variable called reg_pay. Format US currrency dollar and cents. Hint: reg_hrs multiplied by reg_pay_rate.

Calculate overtime pay into variable called ot_pay. Format US currrency dollar and cents. Hint: ot_hrs multiplied by ot_pay_rate.

Calculate gross pay into variable gross_pay by adding reg_pay to ot_pay. Format US currrency dollar and cents.

Using one function statement and concatenation not commas display employee name,

next line indent regular hours worked, regular hourly pay rate, regular pay,

advance next line, tab indent, overtime hours worked, overtime hourly pay rate, overtime pay,

advance next line, using tab indents line up gross pay. Hint: when printing currency use format 8 positions with comma and 2 decimal places.

Display Example:

Employee: Jerry

Regular Hours Worked: 40.00 Regular Hourly Pay Rate: $20.33 Regular Pay $ 813.20

Overtime Hours Worked: 7.50 Overtime Hourly Pay Rate: $25.41 Overtime Pay $ 190.58

Gross Pay $ 1,003.78

If gross_pay is > 999.99 display "Over one thousand." else if gross_pay => 500.00 display "Between five hundred and one thousand." else otherwise display "Under five hundred."

Display "Exam #1 program finished!"

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

=+c Comment on the results.

Answered: 1 week ago