🐍
PYTHON QUESTAgent Academy
0 XP
150 XP to Next Rank
Mission #1

⚡Lesson 1: Basics of Python

Print, Data Types, Variables & Math!

Lesson 1: Basics of Python

Python is a readable programming language used to give instructions to computers. In this first lesson, you will learn how Python talks to you through the console, how to store information in variables, and how to do math.

Key Concepts to Remember:

  • •
    Print: To see text in the black console box, use the print() function. Whatever you put inside the parentheses gets shown on screen.
  • •
    Data Types: The 4 main types are Strings ("words in quotes"), Integers (whole numbers like 53), Floats (numbers with decimals like 53.01), and Booleans (True or False).
  • •
    Variables: Variables are containers that store data values. A variable name cannot start with a number, cannot have spaces, and in Python we use snake_case (like agent_name).
  • •
    Arithmetic Math: Python can calculate instantly using + (addition), - (subtraction), * (multiplication with an asterisk), and / (division).

💻Variables and Math Example (IDE Syntax Colors)

agent_name = "Agent Ali"
gadget_power = 100
power_boost = 50
 
print(agent_name)
print(gadget_power + power_boost)

💡 Python stores the name and power values in variables, adds them together, and prints 150 on the console.

💡 Pro Tip: Remember: In Python, developers always use snake_case (lowercase with underscores like gadget_power) for variable names.