Client Login Register
Calculate Price & Order →
← Back to all articles

Python, programming homework help

Published on December 02, 2026 • Category: Academic
Python, programming homework help

Python, programming homework help

Using Python 3.x. code the following and submit it in one file. Save it as a python file (.py)

You can download it from this site: https://www.python.org/downloads/.

1. Problem 1: Write a program to solve a simple payroll calculation. Find the amount of pay given, hours worked, and hourly rate. (The formula to calculate payroll is pay = hourly rate * hours worked.) Use these values to test the calculation: Problem 1A (hours = 30 and rate = 8.52) and Problem 1B (hours = 53 and rate = 11.54). Display hourly rate, hours worked, and pay. Use the print command and make basic mathematical calculations.

2. Problem 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. ) Use these values to test the calculation: Problem 2 (number of miles driven = 298) and (amount of gas used = 12.17). Use the print command and make basic mathematical calculations.




Share

We only email you; unsubscribe in one click. No address is ever sold.

Ask about study support 💬 WhatsApp 📞

Just now