Skip to content

sawzedong/2022-STEAM-Intake-Scavenger-Hunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation: Intake 2022 Scavenger Hunt

https://intake-2022.szd101.repl.co/

Note: this website may or may not be deprecated and discontinued in the future.

Usage

This is the first stage of the trial for the Y1s before they were to attend physical trials. The goal was to use this to decrease and manage the number of participants to a reasonable number.

Content

The Scavenger Hunt includes:

  1. Introduction page
  2. Stages with questions (6x)
  3. Final stage
  4. Help page
They would have to solve each question to proceed to the next page, and only if they complete the final stage (and fill in the Google Form) before the deadline are they allowed to attend physical trials.

Solutions to Questions

Stage 1.
No questions

Stage 2.
134 (watch the video)
Until (do... until a condition is met)

Stage 3.
Solving a math problem step by step, Searching for relevant and discarding irrelevant information in a problem

   | X | X
   | X |   
 X |   |   

(See XNOR gate, only those with 0 or 2 highlighted will be highlighted)

Stage 4.

  1. Start infinite loop of all the steps below
  2. Input light sensor data
  3. If light value is low then: carry out step below
  4. Motor C speed increase
  5. If light value is high then: carry out step below
  6. Motor A speed increase
  7. Else, if light value is ok: carry out step below
  8. Drive straight
**OR**
  1. Start infinite loop of all the steps below
  2. Input light sensor data
  3. If light value is high then: carry out step below
  4. Motor A speed increase
  5. If light value is low then: carry out step below
  6. Motor C speed increase
  7. Else, if light value is ok: carry out step below
  8. Drive straight
(If high, robot has deviated to the right, hence increase A's speed to move towards the left. Vice versa.)

Stage 5.
1.30°N, 103.88°E (Since the range is 2d.p., it is roughly 1.1km, taking the coordinates of Dunman High School and rounding it provides an answer accurate enough)

Stage 6.
STEAM (Either highlight the pages to see, or just look for bolded letters)

Technologies

The page is coded and runs on python's flask backend module, and hosted on replit.com (see https://replit.com/@SZD101/Intake-2022#README.md).

Templates and pages are coded using HTML and CSS, but submission of answers are handled using python's flask to prevent inspect element to find answers.

jQuery is used for any front-end javascript involved (such as the changing link as text input changes)

As replit's are public to all, the answers and route links are placed in a .env file and queried using os.environ['KEY_NAME']. Do ensure to run import os at the start of the file.
IMPORTANT: env.json is only present to show what the hidden keys and texts used in the 2022 Intake exercise were. Do NOT upload the answers as a file that is visible. (if using replit, there is an inbuilt secrets function).

Although mostly unnecessary, an additional layer of answer protection is added by hash comparison instead of storing plaintext, using hashlib.sha3_256('YOUR TEXT').hexdigest(). Again, run import hashlib at the start of the code.

As replit.com timeout and go down after about an hour of inactivity, to prevent issues with re-syncing and having to keep pressing 'run', https://uptimerobot.com/ is used to constant ping the website every 5 minutes or so to keep it running. (Thanks to 2020 - 2021 EXCO for suggesting during the Discord Bot lessons)
Note: this bot has been discontinued as the website is no longer used since 8 April 2022.

Help

https://flask.palletsprojects.com/en/2.0.x/

https://codeburst.io/jinja-2-explained-in-5-minutes-88548486834e

Other help

Contact Ze Dong ([email protected]), but if you are looking at this document you most likely have my number.

Credits

Thanks to Harry and Darrius for helping to come up with the questions and content for the website.