Write a program to prompt the user for hours and rate

Assignment Help Python Programming
Reference no: EM132382470

Question

How can you write a program to prompt the user for hours and rate per hour using input to compute gross pay. Award time-and-a-half for the hourly rate for all hours worked above 40 hours. Put the logic to do the computation of time-and-a-half in a function called computepay() and use the function to do the computation.

The function should return a value. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75). You should use input to read a string and float() to convert the string to a number.

Reference no: EM132382470

Questions Cloud

Switzerland over summer and brought back : How many U.S. dollars will you get if you exchange your swiss francs for U.S. dollars? The exchange rate is 1 U.S dollar = 1.0638 swiss francs.
Estimate common stock value per share : Using the free flow valuation model. Estimate common stock value per share. The value is?
What are the total shortage costs : The chairs are sold out before they are restocked. What are the total shortage costs?
CSC71001 Programming Assignment Problem : CSC71001 Programming I Assignment help and solution, Southern Cross University, Assessment help - illustrate a particular concept, including an explanation
Write a program to prompt the user for hours and rate : Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Award time-and-a-half for the hourly rate.
How many orders will company place if it follows economic : How many orders will company place if it follows the economic order quantity model?
What are the total carrying costs : The chairs are sold out before they are restocked. What are the total carrying costs?
Make a Vodcast presentation : This assessment task requires you to make a 5-minute Vodcast presentation (with audio, written text, and pictures/diagrams) about cancer (breast or prostate)
Write program the computes the minimum number of coins : Write program the computes the minimum number of coins that the cashier can return. To solve this problem use the greedy algorithm explained.

Reviews

Write a Review

Python Programming Questions & Answers

  Why members discontinue and thereby reduce attrition

Write an algorithm in structured English pseudocode that describes the steps required to perform the task specified. Run your program using the test data.

  Describe what the function does in reality

Describe what the function does in reality when when called with a string argument. It does not correctly check for lowercase letters.

  Programming exercise - routing of telephone

programming exercise - routing of telephone callsdescriptionsome telephone operators have submitted their price lists

  Design a program that asks the user to enter 10 golf scores

Design a program that asks the user to enter 10 golf scores. The scores should be stored in an Integer array. Sort the array in ascending order and display.

  Define an init method that has one parameter named self

Define an init method that has one parameter named "self." In the init method, create an instance variable named dice that holds an empty list.

  Write a python script that reads and analyses

Write a Python script that reads and analyses the child mortality data file (WHOSIS_MDG_000003.csv) .

  Calculate target heart rate during fitness training

Write a program to calculate target heart rate during fitness training. This program has two functions: main and heart_rate_calculator.

  Describe why are the values of f and g different

Describe specifically and why are the values of f and g different? Support your experimentation with a screen capture of executing the code.

  Write a program to multiply three numbers

Write a program which gives the option between doing 3 things Add two numbers, Multiply three numbers and Multiply a number and a string.

  Calculate the area of a rectangle and displays it

Write a python program that calculates the area of a rectangle and displays it - Display the variables length, width and area on screen using the print function

  Determine the expected output of your tests yourself

CSP1150/CSP5110 Programming Principles Assignment - Testing and Quality Assurance, Edith Cowan University, Australia. Determine expected output of your tests

  Create three test cases each consisting of a value

Create and return a list of all the int's in the range from 0 to maxInt not including maxInt that are divisible of both int's in twoInts.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd