Computer Science, asked by shalinithoprami, 9 months ago

Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Use 35 hours and a rate of 2.75 per hour to test the program (the pay should be 96.25). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking or bad user data

Answers

Answered by rc4ramchandra82
3

Answer:

#compute gross pay bye hours and rate per hour

hrs=input("Enter Hour:")

rate=input("Eenter Rate per Hour:")

pay=float(hrs)*float(rate)

print("Pay:", pay)

Explanation:

#compute gross pay bye hours and rate per hour

hrs=input("Enter Hour:")

rate=input("Eenter Rate per Hour:")

pay=float(hrs)*float(rate)

print("Pay:", pay)

@Desirehabiyambere

Desirehabiyambere

commented over 1 year ago

I want your help because I run above code and showed me an error. see what I got

help_code

@anirudh-jwala

anirudh-jwala commented about 1 year ago • edited about 1 year ago

@ardeshiir @Desirehabiyambere Please revise your code

hrs=input("Enter Hour:")

rate=input("Enter Rate per Hour:")

pay=float(hrs)*float(rate)

print("Pay:", pay)

@dakshbagga

dakshbagga

commented 5 months ago

This first line is provided for you

hrs = input("Enter Hours:")

rate = input("Enter Rate:")

pay= float(hrs)*float(rate)

print (pay)

@sagunraul

sagunraul

commented about 2 months ago

This first line is provided for you

xh = input("Enter Hours: ")

xr = input ("Enter Rate: ")

xp = float(xh) * float(xr)

print("Pay:",xp)

PLEASE see the p letter because of this you are getting so no worry your problem is solve :)

@garimashukla373

garimashukla373

commented about 1 month ago

hrs=input("Enter Hour:")

rate=input("Enter Rate per Hour:")

pay=float(hrs)*float(rate)

print("Pay:", pay)

Screenshot (55)

@sai799376

sai799376

commented about 1 month ago

Thanks for your reply. But I want 3.3.py assignment. Please help me.

@Simbazuva

Simbazuva

commented 11 days ago

hrs = int(input("Enter Hours: "))

rt = float(input("Enter rate: "))

p = float(rt * hrs)

print("Pay:", p)

Answered by moranpooja24
0

Answer:

hour = input("Enter Hours:")

rate = input("Enter rate:")

print("Pay:",float(hour)*float(rate))

Explanation:

output: Pay: 96.25

Similar questions