simbax

parzyste.py

Dec 28th, 2012
6,477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. # coding=utf-8
  2. # Program wyświetli, czy podana liczba jest parzysta
  3. liczba = input("Podaj liczbę: ")
  4. if int(liczba) % 2 == 0:
  5.     print "Liczba",liczba,"jest parzysta!"
  6. else:
  7.     print "Liczba",liczba,"jest nieparzysta!"
Advertisement
Add Comment
Please, Sign In to add comment