Advertisement
Spocoman

09. Weather Forecast

Dec 8th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. weather = input()
  2.  
  3. if weather == 'sunny':
  4.     print('It\'s warm outside!')
  5. else:
  6.     print('It\'s cold outside!')
  7.  
  8.  
  9. Второ решение:
  10.  
  11. weather = 'cold'
  12. if input() == 'sunny':
  13.     weather = 'warm'
  14. print(f'It\'s {weather} outside!')
  15.  
  16.  
  17. Taрикатско решение:)
  18.  
  19. print('It\'s warm outside!' if input() == 'sunny' else 'It\'s cold outside!')
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement