Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program Problem (2)
#1
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
Reply
#2
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

Reply
#3
Lol how did I forgot that. And sorry, I will
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problem program runs in a loop jasserin 0 1,317 May-18-2024, 03:07 PM
Last Post: jasserin
  Problem: Once I cancel the process my program will start working! Hadad 0 2,421 Jul-24-2019, 04:09 PM
Last Post: Hadad
  Program Problem ChrisG 2 3,041 May-25-2019, 11:41 AM
Last Post: ChrisG
  problem running program in VScode LavaCreeperKing 4 5,661 Mar-25-2018, 04:34 PM
Last Post: LavaCreeperKing
  Program not running (Overloading problem) anurag123 2 3,710 Feb-19-2018, 07:23 PM
Last Post: nilamo
  Vending Machine Program: Problem with variables icabero0225 2 9,960 Jun-08-2017, 11:04 AM
Last Post: buran
  Whats my python program's problem arman 13 12,405 Mar-13-2017, 08:47 PM
Last Post: metulburr
  problem with importing my program meems 1 5,086 Nov-27-2016, 01:19 AM
Last Post: micseydel

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.