Skip to content

Instantly share code, notes, and snippets.

@KKarthikeya
Created August 16, 2015 04:14
Show Gist options
  • Save KKarthikeya/1c9e340db8be324cd24f to your computer and use it in GitHub Desktop.
Save KKarthikeya/1c9e340db8be324cd24f to your computer and use it in GitHub Desktop.
Write a program to prompt the user for hours and rate per hour using raw_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 raw_input to read a string and float() to convert the string to a number. Do not worry about error checking or bad user data.
hours = float(raw_input("Enter Hours:"))
rate = float(raw_input("Enter rate:"))
print hours*rate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment