summaryrefslogtreecommitdiff
path: root/comp/work/6/iceCream.py
blob: 10db61ca092a55e9402c136b586989b2956147c5 (plain)
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
while True:
    week = input("is it a week day: (yes/no) ").lower()
    if week == "yes":
        break
    elif week == "no":
        break
    
while True:
    temp = int(input("what is the temprature: "))
    if temp >= 20:
        if temp <= 45:
            break
sold = 0
if week == "no":
    if 20 <= temp <= 30:
        sold = 200
    elif 31 <= temp <= 38:
        sold = 300
    else:
        sold = 240
elif week == "yes":
    if 20 <= temp <= 30:
        sold = 200/2
    elif 31 <= temp <= 38:
        sold = 300/2
    else:
        sold = 240/2
print(sold, "ice creams will be sold")