#Melissa Hensley #CIS 122 #Chapter 7 #Programming Exercise 1 rate = float(input("How much does the employee make an hour? ")) while rate < 7.50 and rate < 18.25: print "ERROR: Enter a rate between $7.50 amd $18.25." rate = float(input("How much does the employee make an hour? ")) hours = float(input("How many hours did the employee work? ")) while hours < 0 and hours > 40: print "ERROR: Enter a number between 0 and 40." hours = float(input("How many hours did the employee work? ")) grossPay = rate * hours print grossPay
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question