Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

flowchart: diagram that graphically depicts the steps in a program - ov…

Question

flowchart: diagram that graphically depicts the steps in a program

  • ovals are terminal symbols
  • parallelograms are input and output symbols
  • rectangles are processing symbols
  • symbols are connected by arrows that represent the flow of the program

use float(input(\give number\)) to get a number

create a program based on this flowchart:
start
input the hours worked
input the hourly pay rate
calculate gross pay as hours worked multiplied by pay rate
display the gross pay
end

Explanation:

Step1: Get hours worked

hours = float(input("Input the hours worked: "))

Step2: Get hourly pay rate

rate = float(input("Input the hourly pay rate: "))

Step3: Calculate gross pay

gross_pay = hours * rate

Step4: Display gross pay

print("The gross pay is", gross_pay)

Answer:

The Python program based on the flowchart is:

hours = float(input("Input the hours worked: "))
rate = float(input("Input the hourly pay rate: "))
gross_pay = hours * rate
print("The gross pay is", gross_pay)