Python Forum

Full Version: Program Problem (2)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
from time import sleep
from random import randint

print('Hallo, en welkom bij deze tafeltrainer.')
print('Keuzemenu')
print(' 1 = Beginnen (Normaal)')
print(' 2 = Beginnen (Gepersonaliseerd')
print(' 3 = Afsluiten')
choice = int(input('Keuze (1, 2, 3) >> '))

if choice == 1
    ingame = 1
    while ingame < 2:
        num1 = randint(1,9)
        num2 = randint(1,9)
        print('Wat is',num1,'x',num2,'?')
        answer = input('Antwoord >> ')
        total = num1 * num2
        if int(answer) == total:
            print('Goed :)')
            sleep(1)
        else:
            print('Fout :(')
            sleep(1)

elif:

    ingame = 1

    while ingame < 2:
        print('Welke tafels wil je oefenen?')
        personalized_math = input('1 t/m 9 >> ')
        num1 = personalized_math
        num2 = randint(1,9)
        print('Wat is',num1,'x',num2,'?')
        answer = input('Antwoord >> ')
        total = num1 * num2
        if int(answer) == total:
            print('Goed :)')
            sleep(1)
        else:
            print('Fout :(')
            sleep(1)

else:
    exit()
Hey, here's the Python noob again! Can someone explain me why I get a syntax error on line 11? Think Huh Wall
missing colon at the end of the line.
And please, next time use descriptive thread title.
Lol how did I forgot that. And sorry, I will