Ask coding questions

← Back to all posts
Cant figure this out
JalaBrat (1)

Hey yall, total noobie here .......

Been trying to google but no luck
Want to figure out how to properly use functions but cant get them right

Its a simple quiz from the code its visible what i want it to be but cant get it to work...any good soul can explain it a little? :D

Answered by ArchieMaclean (731) [earned 5 cycles]
View Answer
ArchieMaclean (731)

That code all seems to be working...the only thing you should change is line 10, to:

qst = input(question)

Otherwise, it just waits input but doesn't ask the question.
You should also probably remove line 16, because that means the same question will be asked over and over.
Then, in the quiz function, you can add more questions :)

Please mark this as the answer if it solved your problem :)

JalaBrat (1)

@ArchieMaclean Wow i cant believe i rewrote the code 5 times and the whole time the problem was line 10..didnt put "question" inside brackets...Thank you!