# You will complete this assignment in Python 3.x. Make sure you have downloaded the software and it is installed correctly. You will download it from this To ( or the latest version–view the video above ). Create a (starts at line 1 of your code) with the following information: Jerimiah Ginn Dr. Novadean Watson-Williams Week # 4 Date completed 2. Create a Python program to solve a simple pay calculation. Calculate the amount of pay, given employee name, hours worked, and hourly rate. (The formula to calculate payroll is pay = hourly rate * hours worked.) Display employee name, hourly rate, hours worked, and pay. (Do not add any rules such as overtime) Create a Python program to calculate the average miles per gallon obtained on a trip. Input car name, 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. ) Display car name, gas used, miles driven and MPG. Use your own values to test the. You can hard code the values or you can use the input() function. See announcement for sample code. Purchase the answer to view it

Analysis of Pay Calculation and MPG Calculation Programs

Introduction:

In this assignment, we will be creating two Python programs to solve simple pay and miles per gallon (MPG) calculations. The first program will calculate an employee’s pay based on their hourly rate and hours worked. The second program will calculate the average MPG obtained on a trip based on the number of miles driven and the amount of gas used.

Program 1: Pay Calculation Program:

The pay calculation program will take the employee’s name, hours worked, and hourly rate as inputs. It will then use the formula pay = hourly rate * hours worked to calculate the amount of pay. Finally, it will display the employee’s name, hourly rate, hours worked, and pay.

To implement this program, we can use the following steps:

Step 1: Collect Inputs:

– Input the employee’s name.

– Input the hours worked.

– Input the hourly rate.

Step 2: Calculate the Pay:

– Multiply the hours worked by the hourly rate to calculate the pay.

Step 3: Display the Results:

– Display the employee’s name.

– Display the hourly rate.

– Display the hours worked.

– Display the calculated pay.

Program 2: MPG Calculation Program:

The MPG calculation program will take the car’s name, amount of gas used, and number of miles driven as inputs. It will then use the formula MPG = number of miles driven / amount of gas used to calculate the average miles per gallon. Finally, it will display the car’s name, amount of gas used, miles driven, and MPG.

To implement this program, we can use the following steps:

Step 1: Collect Inputs:

– Input the car’s name.

– Input the amount of gas used.

– Input the number of miles driven.

Step 2: Calculate MPG:

– Divide the number of miles driven by the amount of gas used to calculate the MPG.

Step 3: Display the Results:

– Display the car’s name.

– Display the amount of gas used.

– Display the number of miles driven.

– Display the calculated MPG.

Conclusion:

In conclusion, we will be creating two Python programs to calculate an employee’s pay and the average MPG obtained on a trip. The pay calculation program will take the employee’s name, hours worked, and hourly rate as inputs and calculate the pay using the formula pay = hourly rate * hours worked. The MPG calculation program will take the car’s name, amount of gas used, and number of miles driven as inputs and calculate the average MPG using the formula MPG = number of miles driven / amount of gas used. Both programs will display the relevant information and calculated results.

### Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.

Click Here to Make an Order Click Here to Hire a Writer