finderabc

03. Even or Odd

Sep 23rd, 2020
805
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #1. read int number
  2. #2. check is even or odd
  3. #3. print
  4. number = int(input())
  5. #четно -> дели на 2 без остатък -> остатък = 0
  6. #нечетно -> остатък != 0
  7.  
  8. if number % 2 == 0:
  9.     print('even')
  10. else:
  11.     print('odd')
RAW Paste Data