Проблем с 03. Sumer Outfit в programming basics - Python
Здравейте имам проблем с вход: 22 Afternoon. Дава ми като изход "It's 22 degrees, get your None and None."
Това е кодът. Благодаря предварително.
grad=int(input())
time=input()
Outfit=None
Shoes=None
if time=="Morning":
if grad>=10 and grad<=18:
Outfit = 'Sweatshirt'
Shoes = 'Sneakers'
elif grad<18 and grad>=24:
Outfit = 'Shirt'
Shoes = 'Moccasins'
elif grad>=25:
Outfit = 'T-Shirt'
Shoes = 'Sandals'
elif time=="Afternoon":
if grad>=10 and grad<=18:
Outfit = 'Shirt'
Shoes = 'Moccasins'
elif grad<18 and grad>=24:
Outfit = 'T-Shirt'
Shoes = 'Sandals'
elif grad>=25:
Outfit = 'Swim Suit'
Shoes = 'Barefoot'
elif time=="Evening":
if grad>=10 and grad<=18:
Outfit = 'Shirt'
Shoes = 'Moccasins'
elif grad<18 and grad>=24:
Outfit = 'Shirt'
Shoes = 'Moccasins'
elif grad>=25:
Outfit = 'Shirt'
Shoes = 'Moccasins'
print(f"It's {grad} degrees, get your {Outfit} and {Shoes}.")
Да, това е проблема на кода в случая.
Ето и още един възможен прочит на задачата.
https://pastebin.com/abBZuu68