100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Python Program from Unit 6 (in text format) A2 $6.44   Add to cart

Essay

Python Program from Unit 6 (in text format) A2

 124 views  0 purchase
  • Course
  • Institution

BTEC IT Level 3 Unit 6 Assignment 2 PROGRAM REQUIRED TO PASS

Preview 1 out of 2  pages

  • December 4, 2017
  • 2
  • 2016/2017
  • Essay
  • Unknown
  • Unknown
avatar-seller
#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.

#Start of calculation output.
print ("Milage £", MR)
print ("Labour cost £", HR)
print ("Resource cost £", R)
print
("-------------------------------------------------------")
print ("Sub-total £",ST)
print
("-------------------------------------------------------")
print ("Discount £", D)
print ("VAT £", VAT)
print
("-------------------------------------------------------")
print ("Grand-total £", GT)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

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

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

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.44. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67474 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$6.44
  • (0)
  Add to cart