-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCNA340_Python.py
More file actions
26 lines (21 loc) · 811 Bytes
/
Copy pathCNA340_Python.py
File metadata and controls
26 lines (21 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
print("Davy's auto shop services\nOil change -- $35\nTire rotation -- $19\nCar wash -- $7\nCar wax -- $12")
dict1={"Oil change":35,"Tire rotation":19,"Car wash":7,"Car wax":12,"-":"No service"}
print("\nSelect first service:")
ser1=input()
print("Select second service:")
ser2=input()
#test
print("\nDavy's auto shop invoice\n")
if ser1!='-' and ser2!='-':
print("Service 1: "+ser1+", $"+ str(dict1[ser1]))
print("Service 2: "+ser2+", $"+ str(dict1[ser2]))
Total=dict1[ser1]+dict1[ser2]
elif ser1=='-':
print("Service 1: "+"No service")
print("Service 2: "+ser2+", $"+ str(dict1[ser2]))
Total=dict1[ser2]
else:
print("Service 1: "+ser1+", $"+ str(dict1[ser1]))
print("Service 2: "+"No service")
Total=dict1[ser1]
print("\nTotal: $"+str(Total))