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?
Program Problem (2)
Program Problem (2)
|
May-25-2019, 05:10 PM
missing colon at the end of the line.
And please, next time use descriptive thread title.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs
May-25-2019, 05:11 PM
Lol how did I forgot that. And sorry, I will
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
problem program runs in a loop | jasserin | 0 | 173 |
May-18-2024, 03:07 PM Last Post: jasserin |
|
Problem: Once I cancel the process my program will start working! | Hadad | 0 | 1,697 |
Jul-24-2019, 04:09 PM Last Post: Hadad |
|
Program Problem | ChrisG | 2 | 2,042 |
May-25-2019, 11:41 AM Last Post: ChrisG |
|
problem running program in VScode | LavaCreeperKing | 4 | 4,037 |
Mar-25-2018, 04:34 PM Last Post: LavaCreeperKing |
|
Program not running (Overloading problem) | anurag123 | 2 | 2,663 |
Feb-19-2018, 07:23 PM Last Post: nilamo |
|
Vending Machine Program: Problem with variables | icabero0225 | 2 | 8,581 |
Jun-08-2017, 11:04 AM Last Post: buran |
|
Whats my python program's problem | arman | 13 | 9,056 |
Mar-13-2017, 08:47 PM Last Post: metulburr |
|
problem with importing my program | meems | 1 | 3,878 |
Nov-27-2016, 01:19 AM Last Post: micseydel |
Users browsing this thread: 1 Guest(s)