forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.py
More file actions
83 lines (76 loc) · 2.21 KB
/
Copy pathcode.py
File metadata and controls
83 lines (76 loc) · 2.21 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
id = 1
class LaundryService:
def __init__(
self,
Name_of_customer,
Contact_of_customer,
Email,
Type_of_cloth,
Branded,
Season,
id,
):
self.Name_of_customer = Name_of_customer
self.Contact_of_customer = Contact_of_customer
self.Email = Email
self.Type_of_cloth = Type_of_cloth
self.Branded = Branded
self.Season = Season
self.id = id
def customerDetails(self):
print("The Specific Details of customer:")
print("customer ID: ", self.id)
print("customer name:", self.Name_of_customer)
print("customer contact no. :", self.Contact_of_customer)
print("customer email:", self.Email)
print("type of cloth", self.Type_of_cloth)
if self.Branded == 1:
a = True
else:
a = False
print("Branded", a)
def calculateCharge(self):
a = 0
if self.Type_of_cloth == "Cotton":
a = 50.0
elif self.Type_of_cloth == "Silk":
a = 30.0
elif self.Type_of_cloth == "Woolen":
a = 90.0
elif self.Type_of_cloth == "Polyester":
a = 20.0
if self.Branded == 1:
a = 1.5 * (a)
else:
pass
if self.Season == "Winter":
a = 0.5 * a
else:
a = 2 * a
print(a)
return a
def finalDetails(self):
self.customerDetails()
print("Final charge:", end="")
if self.calculateCharge() > 200:
print("to be return in 4 days")
else:
print("to be return in 7 days")
while True:
name = input("Enter the name: ")
contact = int(input("Enter the contact: "))
email = input("Enter the email: ")
cloth = input("Enter the type of cloth: ")
brand = bool(input("Branded ? "))
season = input("Enter the season: ")
obj = LaundryService(name, contact, email, cloth, brand, season, id)
obj.finalDetails()
id = id + 1
z = input("Do you want to continue(Y/N):")
if z == "Y":
continue
elif z == "N":
print("Thanks for visiting!")
break
else:
print("Select valid option")