>>> The PyQuest_

Intro to Python CTF Challenge

>>> MISSION BRIEFING: SETUP

Before you begin, you must acquire the Validation Tool. This Python script will check your flags and track your score.

  1. Download the tool: 💾 Download grader.py
    (Ensure you save this file in the same folder as your code)
  2. Open your terminal or IDE.
  3. Run the tool to start the session:
python grader.py
Topic: Input/Output

01. The Echo Chamber

The system is speaking backward. Write a script to reverse the string and print it in UPPERCASE.

msg = "nohtyP_si_nuF"
Topic: Booleans

02. The Gatekeeper

Analyze the logic gates. If the code prints "Access Denied", change one variable to print the flag.

if x > 20 or (y < 15 and has_key):
Topic: Loops

03. The Looping Tower

Calculate the sum of all even numbers between 1 and 20 (inclusive) using a while loop.

while count <= 20:
Topic: Functions

04. Function Factory

Define a function assemble_flag(a, b) that joins two strings and appends "3.0" to the end.

def assemble_flag(a, b):
Topic: Files/Except

05. The Lost Scroll

Write a try/except block that attempts to open "ghost.txt" and catches the error to print the flag.

try: open("ghost.txt")
Topic: Lists

06. The Inventory

Replace 'monitor' with 'laptop', sort the list alphabetically, and submit the first item in the new list.

inv = ['keyboard', 'mouse'...]