Skip to content

Instantly share code, notes, and snippets.

@desinas
Created November 5, 2018 18:33
Show Gist options
  • Save desinas/6adb3b42d124ddb5e5960949e7b78e2f to your computer and use it in GitHub Desktop.
Save desinas/6adb3b42d124ddb5e5960949e7b78e2f to your computer and use it in GitHub Desktop.
Coursity exerc2_1
import random
random.seed(100)
while True:
n=random.randrange(0,37,1)
if n == 0:
print("- Κληρώθηκε το 0.")
elif n <= 17:
print("- Μικρός Αριθμός!")
if n <= 10 and 1 == n%2:
print("-- Κόκκινο Χρώμα & Μονός Αριθμός.")
elif n >= 11 and n <= 18 and 0 == n%2:
print("-- Μαύρο Χρώμα & Ζυγός Αριθμός.")
elif n>= 18:
print("- Μεγάλος Αριθμός!")
if n >= 19 and n <= 28 and 1 == n%2:
print("-- Κόκκινο Χρώμα & Μονός Αριθμός.")
elif n >= 29 and 0 == n%2:
print("-- Μαύρο Χρώμα & Ζυγός Αριθμός.")
replay=input("Enter: Επόμενη Κλήρωση, ‘q’+Enter: Τερματισμός")
if replay == 'q':
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment