Spocoman

10. Invalid Number

Dec 20th, 2021 (edited)
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. num = int(input())
  2. if num != 0 and num < 100 or num > 200:
  3.     print('invalid')
  4.  
  5.  
  6. Тарикатско решение с тернарен оператор:)
  7.  
  8. num = int(input())
  9. print('' if num == 0 or 100 <= num <= 200 else 'invalid')
  10.  
  11.  
Add Comment
Please, Sign In to add comment