#Date created 1/12/15
import os.path, time, sys #Used to import functions.
print ("Job Estimate tool Ver. 2.0, powered by Python 3.4.3")
while True: #Loop if user doesn't validate the data when promted.
print()
ID = str(input("Enter your name: ")) #Enter user name.
CID = str(input("Enter employer name: ")) #Enter Employers name.
print()
while True: #Loop for error handling.
try: #Used to run the program but when an error happens the program handles
it.
M = float(input("Enter Miles travelled: ")) #Miles.
H = float(input("Enter hours worked: ")) #Hours worked.
R = float(input("Enter resource cost: £")) #Resource cost.
DQ = (10* int(input("Enter discount (0 = 0%, 1 = 10% and 2 = 20%): ")))
#Discount.
if DQ == 0 or DQ == 10 or DQ == 20: #Return to previous point if
invalid option is enetered.
#Start of validateable data.
print()
print("User: ", ID)
print("Employer: ", CID)
print()
print ("Miles: ", (M))
print ("Hours: ", (H))
print ("Resources: ", (R))
print ("Discount: ", (DQ), "%")
print()
#End of validateable data.
YN = input("Are these details correct? Enter yes or no: ")
#Validation for data shown.
print()
if YN == "yes": #If data is validated.
#Start of calculations.
MR = round((M*2.5),2) #Milage.
HR = round((H*20),2) #Labour cost.
ST = round((MR+HR+R),2) #Sub-total.
D = round((ST*(DQ/100)),2) #Discount value.
DST = round((ST-D),2) #Discounted sub-total.
VAT = round((DST*0.2),2) #VAT
GT = round((DST+VAT),2) #Grand total
#End of calculations.
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller SNK0. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $6.66. You're not tied to anything after your purchase.