#FAIL
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
items = input().split('|')
budget = float(input())
new_prices = []
bought_items = []
profit = 0
new_budget = budget
for item in items:
item = item.split("->")
y = float(item[1])
x = item[0]
if (x == 'Clothes' and y <= 50.0) or (x == 'Shoes' and y <= 35.0) or (x == "Accessories" and y <= 20.50):
if (new_budget - y) >= 0:
new_budget -= y
bought_items.append(y)
y1 = f'{(y * 1.4):.2f}'
new_prices.append(float(y1))
profit = sum(new_prices) - sum(bought_items)
print(*new_prices)
print(f"Profit: {profit:.2f}")
if (budget + profit) >= 150:
print("Hello, France!")
else:
print("Time to go.")
#LEGIT
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
items = input().split('|')
budget = float(input())
new_prices = []
bought_items = []
profit = 0
new_budget = budget
for item in items:
item = item.split("->")
y = float(item[1])
x = item[0]
if (x == 'Clothes' and y <= 50.0) or (x == 'Shoes' and y <= 35.0) or (x == "Accessories" and y <= 20.50):
if (new_budget - y) >= 0:
new_budget -= y
bought_items.append(y)
y1 = f'{(y * 1.4):.2f}'
new_prices.append(str(y1))
profit = sum([float(x) for x in new_prices]) - sum(bought_items)
print(*new_prices)
print(f"Profit: {profit:.2f}")
if (budget + profit) >= 150:
print("Hello, France!")
else:
print("Time to go.")
1 difference: 2 lines, 3 inline differences in 2 changed lines
Added(0,2)
Deleted(0,0)
Changed(2)
Changed in changed(1)
Ignored
Generated on October 29, 2019, 12:30 AM by ExamDiff Pro 10.0.1.7.