Payroll Calculation - Pyton

1. Solve a simple payroll calculation. Find amount of pay given hours worked and hourly rate. (pay = hourly rate * hours worked.) Run this values (hours = 30 and rate = 8.52) and with (hours = 53 and rate = 11.54). Show two decimal places with all data output.
Display hourly rate, hours worked and pay on the Master Console Output.

2. Write a program that will calculate the average miles per gallon obtained on a trip. Input the amount of gas used and the number of miles driven. The formula to calculate miles per gallon is:
miles per gallon = number of miles driven / amount of gas used
Run this problem with:
number of miles driven = 298
amount of gas used = 12.17
Display number of miles driven, amount of gas used and average miles per gallon on the Master Console Output. Show two decimal places with all data output.
Powered by