Reference no: EM132361023
Question
Problem 1:
Provide flowchart and pseudo code for both problems to do the following:- You are going to modify week 4 assignment (2 problems) to use input() function (no hard coded values) to prompt the user to enter the values.
Make sure the prompt message is meaningful, do not say "Enter value", say something like this "Enter hours worked" after you get all the inputs, display the results and prompt the user if wants more calculation (y/n). If no then print a message like "Thank you for ......."
The flowchart must include a loop and if-then
Problem 1: Provide Python program to solve a simple payroll calculation. Calculate the amount of pay, given hours worked, and hourly rate. (The formula to calculate payroll is pay = hourly rate * hours worked.) Display hourly rate, hours worked, and pay.
Problem 2: Provide Python program to 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. ) Display 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.