https://intake-2022.szd101.repl.co/
Note: this website may or may not be deprecated and discontinued in the future.
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.
The Scavenger Hunt includes:
- Introduction page
- Stages with questions (6x)
- Final stage
- Help page
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.
- Start infinite loop of all the steps below
- Input light sensor data
- If light value is low then: carry out step below
- Motor C speed increase
- If light value is high then: carry out step below
- Motor A speed increase
- Else, if light value is ok: carry out step below
- Drive straight
- Start infinite loop of all the steps below
- Input light sensor data
- If light value is high then: carry out step below
- Motor A speed increase
- If light value is low then: carry out step below
- Motor C speed increase
- Else, if light value is ok: carry out step below
- Drive straight
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)
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.
https://flask.palletsprojects.com/en/2.0.x/
https://codeburst.io/jinja-2-explained-in-5-minutes-88548486834e
Contact Ze Dong ([email protected]), but if you are looking at this document you most likely have my number.
Thanks to Harry and Darrius for helping to come up with the questions and content for the website.