+ 1

Can any one create a python code on quiz using Tkinter

its should have Multiple choice questions(using radionuttons) and time limit and it should diaplay the score at the end.

4th Apr 2018, 3:45 AM
roopesh shukla
roopesh shukla - avatar
4 Answers
0
What do you mean GUI? Should you wish to be operating with the quiz in an IDE terminal with no additional visual libraries, you can simply go for text outputs and calculate time elapsed with variables storing the system time when quiz started and system time when quiz ended. For better visuals in terminal you can go for the following format: q1answers = { '1': 'Mars', '2': 'Jupiter', '3': 'Earth', '4': 'Youtube' } print('QUESTION 1: Which of the following is not a planet?') for answer in q1answers: print('{} - {}'.format(answer, q1answer[answer])) I would also suggest looping every question to ensure that the input is in the keys of the suggested answers: answered = False while not answered: answer = input('Answer: ') if answer not in q1answers.keys(): print('Incorrect input') else: answered = True You would also need to store the answers and define correct ones in this case
4th Apr 2018, 8:17 AM
Andrey Vostokov
Andrey Vostokov - avatar
0
ty but i need this to work on Tkinter(python gui)
4th Apr 2018, 10:55 AM
roopesh shukla
roopesh shukla - avatar
0
Better edit post and specify it then ;)
4th Apr 2018, 10:57 AM
Andrey Vostokov
Andrey Vostokov - avatar
0
np bro....btw thank u for your help :)
4th Apr 2018, 11:03 AM
roopesh shukla
roopesh shukla - avatar