CSCI 13300 SP 2025

Go to homepage

Last updated: 2025-03-14

Unit 8 Assessment

Due date and submission

This assignment is due March 29th at 11:59 PM. Submit your solution on BrightSpace, under the “Unit 8” assignment.

Please copy your code into the text box, making sure to indent it properly with whitespace so that it appears the same as in IDLE or wherever you wrote the code. This will make it easier for me to grade.

You can submit multiple times. I will only grade your last submission.

Data

This assignment uses two files:

  1. The text file animals.txt, which you can open by clicking here: animals.txt
  2. The Python file readquiz.py, which you can open by clicking here: readquiz.py

Instructions

Task

In this task, we are going to write a program that implements a graphical quiz game.

Quiz screenshot

You are provided with a text file containing quiz questions animals.txt (source) and a module readquiz.py with a function loadQuestions() able to read Yes/No questions from the questions file. The function returns a list of the form:

[
  ['All dogs, cats and birds are colorblind.', False],
  ['Snake skin is covered in scales.', True],
  ['All tigers have stripes.', False],
  ...
]

Each element of the list is a pair containing a trivia-style statement string and a True/False value that determines whether the statement is true or not.

Step by step

  1. Load questions from the file animals.txt using the module readquiz.py
  2. Create a Tkinter interface, arranging widgets as close as possible to the following layout (you may use additional Frame widgets to help arrange buttons and labels):
Tkinter interface, with elements labeled in red and monospace text

Notes

You should be able to do all of the tasks with only the Python topics we covered in class so far.

If you want to use more complex functionality than what we discussed in class, the Python documentation may be helpful: Python 3.10 documentation