Preparing your workspace...
Loading latest data

What Are Data Types?
A data type defines what kind of value a variable can store and what operations can be performed on it.
In Python, every value has a type that tells the interpreter what kind of data it is and what operations can be performed on it. Python is dynamically typed — you don't declare types; Python figures them out at runtime.
Python has several built-in data types:
| Category | Example |
|---|---|
| Numeric | int, float, complex |
| Boolean | bool |
| Text | str |
| Collection | list, tuple, dict, set |
| Special | NoneType |
Checking a Type
Use the built-in type() function to inspect any value's type.
Why Types matter?
Types determine which operations are valid. Adding two integers gives a number; adding two strings concatenates them. Mixing types can cause a TypeError.
What function is used to check the type of a variable?
Python allows a variable to change data types. This is called:
3.14 is an integer.
What does this return?

What is the result of:

type() is used to create variables.
"25" and 25 have the same data type.
Which data type stores multiple items?
Which is a Boolean value?
What is the result of:

Dive deep into Python's three critical primitive types—int/float for numbers, bool for logic (True/False), and NoneType for when no value is assigned. These are the building blocks for expressions, decisions.
Question1.
What keyword is used to represent an empty or null value in Python variables?
Question2.
What type is returned by type(3.14)?
Question3.
Which type holds either True or False?
Question4.
What is the type of the result from: 5 + 3.0?
Question5.
What’s the output of 5 + True in Python?
Explore Python’s powerful string manipulation capabilities. You'll use methods like count(), join(), and endswith() to transform and analyze text—crucial when cleaning input, analyzing flags, or decoding encoded strings in CTF challenges.
Question1.
What type is "CTF{flag}"?
Question2.
What does "flag".upper() return?
Question3.
Which method removes whitespace from both ends?
Question4.
Which method checks if a string ends with a value?
Question5.
What method joins a list like ['a', 'b'] with - into a-b?
Question6.
What is the output of this:

Question7.
Which symbol is used to declare an f-string?
Question8.
What is the output of the following code?

Question9.
What will this print?

Question10.
What is the output of this zero-padded format?
"{:04}".format(7)
Understand how Python handles groups of data using collections — lists, tuples, sets, and dictionaries — and use their powerful methods to store, retrieve, and manipulate structured data.
Qustion1.
Which collection stores ordered, mutable data?
Question2.
What type is this:
{"flag": "CTF"}
Question3.
Which collection is immutable and ordered?
Question4.
How do you access the second item in a list named data?
Question5.
What’s the output of type((5))?
Question6.
What’s the result of:
len(set("CTFCTF"))
Question7.
Which method removes an item without error if it doesn't exist in a set?
Question8.
What is the result of this list comprehension?
[x * 2 for x in [1, 2, 3]]
Question9.
What does this return?
{1, 2, 3} & {2, 3, 4}
Question10.
What method empties a list or dict?
This task introduces the input() and print() functions for user interaction. It also covers typecasting, allowing you to convert between strings, integers, and other types.
Question1.
Which function collects user input?
Question2.
What is the result type of input()?
Question3.
Which function shows output?
Question4.
What function will convert 3.9 to 3?
Question5.
What does this return?
bool("flag")