Preparing your workspace...
Loading latest data

Conditional statements allow a program to make decisions and execute different blocks of code based on whether certain conditions are true or false. Using if, elif, and else, you can control how your code behaves in different situations—like checking if a user entered the correct flag, validating input, or reacting to different values in logic-based challenges.
Question1.
Which keyword starts a conditional block in Python?
Question2.
What keyword is used when the first condition is False but another one might be True?
Question3.
What keyword ends an if-elif chain if all conditions are false?
Question4.
What is printed?

Question5.
Which logical operator means “both must be True”?
Question6.
What is the output?

Question7.
What’s printed here?

Loops let you repeat actions efficiently — instead of writing repetitive code, you use for loops to iterate over sequences like strings, lists, or ranges. This task teaches how to control the loop, access each element, and use tools like range() to loop over numbers. Mastering for loops is crucial for automation, brute-force scripts, pattern generation, and solving real-world challenges.
Question1.
What keyword is used to create a for-loop in Python?
Question2,.
What function generates a numeric sequence?
Question3.
What will this print?

Question4.
What is the result of list(range(1, 6, 2))?
Question5.
How many times will this print?

The while loop in Python allows you to repeat a block of code as long as a given condition is True. Unlike for loops, which run a fixed number of times, while loops are ideal when the number of iterations isn’t known in advance — such as waiting for a correct flag, retrying login attempts, or scanning a directory until empty. This task helps you control repetition through conditions, counters, and exit logic, which are critical for automation and interactive CTF-style tools.
Question1.
Which loop continues as long as a condition is True?
Question2.
What is the output?

Question3.
What happens if the while condition never becomes False?
Question4.
How many times will this print?

Loop control statements let you manipulate the flow of a loop beyond simple repetition. Whether you want to exit early, skip specific values, or leave placeholders for future logic, Python gives you tools like break, continue, and pass. These are crucial in real-world scenarios like scanning inputs until a condition is met, skipping invalid data, or handling edge cases in CTF challenges where precision matters.
Question1.
Which keyword exits the current loop immediately?
Question2.
Which keyword skips the current iteration and continues the loop?
Question3.
What is printed?

Question4.
What prints here?

Question5.
What prints here?

Nested logic lets your program make complex decisions or repeat actions in multi-dimensional ways. By placing if statements inside loops—or loops within loops—you can build layered checks, matrix-like traversals, and multi-step validations. In CTFs and automation, nested logic is essential for brute-forcing flags, solving pattern challenges, or simulating multi-level logic gates.
Question1.
How many times will this print?

Question2.
What’s the final value of x?

Question3.
How many asterisks will print?

Question4.
What prints?

Question5.
What is printed?
