Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gradus = int(input())
- time_of_day = input()
- outfit = ''
- shoes = ''
- if time_of_day == 'Morning':
- if gradus >= 10 and gradus <= 18:
- outfit = 'Sweatshirt'
- shoes = 'Sneakers'
- elif gradus > 18 and gradus <= 24:
- outfit = 'Shirt'
- shoes = 'Moccasins'
- else:
- outfit = 'T-Shirt'
- shoes = 'Sandals'
- elif time_of_day == 'Afternoon':
- if gradus >= 10 and gradus <= 18:
- outfit = 'Shirt'
- shoes = 'Moccasins'
- elif gradus > 18 and gradus <= 24:
- outfit = 'T-Shirt'
- shoes = 'Sandals'
- else:
- outfit = 'Swim Suit'
- shoes = 'Barefoot'
- else:
- outfit = 'Shirt'
- shoes = 'Moccasins'
- print(f'It\'s {gradus} degrees, get your {outfit} and {shoes}.')
- Второ решение:
- gradus = int(input())
- time_of_day = input()
- outfit = 'Shirt'
- shoes = 'Moccasins'
- if time_of_day == 'Morning' or time_of_day == 'Afternoon':
- if gradus >= 10 and gradus <= 18 and time_of_day == 'Morning':
- outfit = 'Sweatshirt'
- shoes = 'Sneakers'
- elif gradus > 24 and time_of_day == 'Morning' or gradus > 18 and gradus <= 24 and time_of_day == 'Afternoon':
- outfit = 'T-Shirt'
- shoes = 'Sandals'
- elif gradus > 24:
- outfit = 'Swim Suit'
- shoes = 'Barefoot'
- print(f'It\'s {gradus} degrees, get your {outfit} and {shoes}.')
Add Comment
Please, Sign In to add comment