#Robert Nool III #Calculates Payroll #Start def payroll(hour, rate): salary = int(hour) * int(rate) print 'The Employee\'s Gross Salary for the pay period is {:}'. format(salary) return salary hour = input() rate = input() while hour < 0 or hour > 40: hour = input() print 'WARNING: Input Hours is outside possible range. Check for error' while rate < 7.50 or rate > 18.25: rate = input() print 'WARNING: Input Pay Rate is outside possible range. Check for error' payroll(hour, rate)
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