Mistři v programování na #hovnokod

Luki je kokot

x = 0
print("\n")
meno = (input("Tvoje meno: "))
print("\n")
while x < 1:
    print('Ahoj '+str(meno)+' vidím, že ťa zaujíma veľkosť Lukiho čuraka')
    print("\n")
    a = input("(ano/nie)\n: ")
    print("\n")
    if a == ("ano") :
        print("###############################")
        print('# Veľkosť Lukiho čuraka = 0cm #')
        print("###############################")
        print("\n")
        a = input ("Ešte raz ? (ano/nie) \n: ")
        print("\n")
        if a == ("ano"):
            x = 0
        elif a == ("nie"):
            x += 1
        else:
            print ("Prečo ? ... prečo ?")
            x += 1
    elif a == ("nie"):
        print("###########################")
        print("# Luki aj tak žiaden nemá #")
        print("###########################")
        print("\n")
        a = input ("Ešte raz ? \n(ano/nie) \n: ")
        print("\n")
        if a == ("ano"):
            x = 0
        elif a == ("nie"):
            x += 1
        else:
            print ("Prečo ? ... prečo ?")
            x += 1
    else:
        print("Si kokot ?\n")
        a = input("(ano/nie) ? \n: ")
        if a == ("ano"):
            x += 1
        elif a == ("nie"):
            x += 1
        else:
            print ("Prečo ? ... prečo ?")
            x += 1


Matej1237,

Vytiahnute z ExaBGP githubu

now = time.time()
while True and time.time() < now + 5:
	line = sys.stdin.readline().strip()
	if not line or 'shutdown' in line:
		break

Anonymous,


Anonymous,

def validate(timeinstr):
    if timeinstr:
        timeinstr = timeinstr.split(':')
        if len(timeinstr) != 2:
            return 0, 0
        hour = int(timeinstr[0])
        minute = int(timeinstr[1])
        if (hour < 0) or (hour > 23):
            return 0, 0
        if (minute < 0) or (minute > 59):
            return 0, 0
        return hour, minute
    return 0, 0

Anonymous,

def IsEven(num):
    i =  2
    while i < 2147483647:
        if i == num:
            print "The number is even"
            i += 2
            return
    print "The number is false"
    return

Anonymous,