Advertisement
Shannon

py4infoex2.3

Nov 11th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!C:\Python32
  2. #Filename: py4infoex2.3.py
  3.  
  4. from decimal import  *
  5. getcontext()
  6.  
  7. hours = Decimal (input ('hours worked?\n'))
  8. rate = Decimal (input ('hourly wage?\n'))
  9.  
  10. pay = Decimal ((hours * rate).quantize (Decimal ('.01'), rounding=ROUND_UP))
  11. print ('wages earned: ${0}'.format(pay))
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement