-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path601 Python w3
More file actions
22 lines (18 loc) · 846 Bytes
/
601 Python w3
File metadata and controls
22 lines (18 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Script Name: Week Three - Python Lab
# Author: Juan Miguel Cano
# Date of latest revision: 09/17/2024
# Purpose: This Python script prompt the user for hours and rate per hour using input to compute gross pay.
# Resource: Severance, C. R. (n.d.). Python for everybody: Exploring data using Python 3. Retrieved from
# https://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf
# Prompt the user for hours worked
hours = input("Enter Hours: ")
# Convert the input to a float
hours = float(hours)
# Prompt the user for the rate per hour
rate = input("Enter Rate per Hour: ")
# Convert the input to a float
rate = float(rate)
# Calculate gross pay
gross_pay = hours * rate
# Print the result
print("Gross Pay:", gross_pay)