Created
June 18, 2022 08:31
-
-
Save paley777/1f7a82feb7c0c30197380451027c990a to your computer and use it in GitHub Desktop.
Determining odd and even numbers using python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Menginput Angka | |
angka = int(input("Tulis sebuah Angka: ")) | |
# Jika Habis Dibagi Nol, Maka Genap | |
if (angka % 2) == 0: | |
print("{0} adalah Bilangan Genap".format(angka)) | |
# Jika Tidak Habis Dibagi Nol, Maka Ganjil | |
else: | |
print("{0} adalah Bilangan Ganjil".format(angka)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment