-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython code.py
More file actions
81 lines (70 loc) · 2.55 KB
/
Copy pathpython code.py
File metadata and controls
81 lines (70 loc) · 2.55 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
def Vacuum():
cost = 0
location_input = input("Enter Location of Vacuum:")
status_input = int(input("Enter status of " + location_input + "(0 if clean/1 if dirty):"))
status_input_complement = int(input("Enter status of other room:"))
if location_input == 'A':
print("Vacuum is placed in Location A")
if status_input == 1:
print("Location A is Dirty.")
cost += 1
print("Cost for CLEANING A " + str(cost))
print("Location A has been Cleaned.")
if status_input_complement == 1:
print("Location B is Dirty.")
print("Moving right to the Location B. ")
cost += 1
print("COST for moving RIGHT" + str(cost))
cost += 1
print("COST for SUCK " + str(cost))
print("Location B has been Cleaned. ")
else:
print("No action" )
print("Location B is already clean.")
if status_input == 0:
print("Location A is already clean ")
if status_input_complement == 1:
print("Location B is Dirty.")
print("Moving RIGHT to the Location B. ")
cost += 1
print("COST for moving RIGHT " + str(cost))
cost += 1
print("Cost for SUCK " + str(cost))
print("Location B has been Cleaned. ")
else:
print("No action ")
print("Location B is already clean.")
else:
print("Vacuum is placed in location B")
if status_input == 1:
print("Location B is Dirty.")
cost += 1
print("COST for CLEANING " + str(cost))
print("Location B has been Cleaned.")
if status_input_complement == 1:
print("Location A is Dirty.")
print("Moving LEFT to the Location A. ")
cost += 1
print("COST for moving LEFT" + str(cost))
cost += 1
print("COST for SUCK " + str(cost))
print("Location A has been Cleaned.")
else:
print("No action " + str(cost))
print("Location A is already clean.")
else:
print(cost)
print("Location B is already clean.")
if status_input_complement == 1:
print("Location A is Dirty.")
print("Moving LEFT to the Location A. ")
cost += 1
print("COST for moving LEFT " + str(cost))
cost += 1
print("Cost for SUCK " + str(cost))
print("Location A has been Cleaned. ")
else:
print("No action ")
print("Location A is already clean.")
print("Total Cost: " + str(cost))
Vacuum()