Close

Trivially Making Question Cards

A project log for Think-a-Tron 2020

In 1960 Hasbro unleashed its first personal "computer" to the masses, decades before IMSAI, Apple, or Commodore. Remembering Think-a-Tron.

Michael GardiMichael Gardi 01/28/2021 at 03:150 Comments

I'm relatively new to Python, but I'm beginning to appreciate how quickly you can get things done with it. What I thought might take a few days turned out to be more like a few hours. 

So the application works with one sheet of Avery 5371 business cards at a time. You simply key in ten questions, choices, and answers then press the Save button. Three files will be created.

  1. A text file with your data so that you can Load it back in to make changes.
    ['Humans and chimpanzees share roughly how much DNA?', 'Roughly how long does it take for the sun’s light to reach Earth ?', 'At what temperature are Celsius and Fahrenheit equal?', 'What modern-day country was Marie Curie born in?', 'How many hearts do octopuses have?', 'Apollo 15 was the first moon mission to carry a lunar rover?', 'On the periodic table, what symbol stands for silver?', 'Mercury is the only planet in the solar system without a moon.', 'What was the name of the first man-made satellite launched by the Soviet Union in 1957?', 'What is the biggest planet in our solar system?']
    ['10%', '8 minutes', '-40', 'Hungary', 'One', '', 'Si', '', 'Sputnik 1', 'Uranus']
    ['52%', '8 hours', '0', 'Poland', 'Two', '', 'Ag', '', 'Echo 1', 'Jupiter']
    ['98%', '8 days', '32', 'Czechoslovakia', 'Three', '', 'Na', '', 'Explorer 1', 'Neptune']
    ['', '', '', '', '', '', '', '', '', '']
    ['', '', '', '', '', '', '', '', '', '']
    [3, 1, 1, 2, 3, 4, 2, 5, 1, 2
  2. A PDF of the questions and choices nicely formatted one per card.
  3. A PDF of the ten QR codes laid out to align with the correct questions when two sided printing.

It would be pretty easy to setup a trivia night with this program.

I did run into one issue creating this program. I'm using the ReportLab PDF Library to layout the cards (which works great by the way). My intention was to use the corresponding reportlab-qrcode library to generate the QR codes on the fly. I had thoughts or obfuscating the "payload" of each QR Code since if you look very closely at the QR Codes for simple "A", "B", "C", "T", and "F" payloads you can in fact distinguish between them.

Unfortunately the QR Code library I'm using on the ESP32 side would not read the generated codes. I tried many different variations but, in the end, decided to employ the QR Code images that I have been using all along. These images were created online at  QR Code Generator.

Discussions