02/06/2026
*π Python Basics Part 1 ππ₯*
If youβre starting Python for the first time, this is the perfect place to begin.
In this part, youβll learn the core basics every Python developer must know. π»
*π§ 1. What is Python?*
Python is one of the easiest and most powerful programming languages.
β
Easy to learn
β
Beginner friendly
β
Used in AI, Web Development, Automation & Data Science
*Example:*
print("Hello, World!")
*π Output:*
Hello, World!
*π¦ 2. Variables in Python*
Variables store data.
*Example:*
name = "Python"
version = 3.12
Here:
β "name" stores text
β "version" stores numbers
*π€ 3. Data Types in Python*
Python supports different types of data.
*π String "str"*
Used for text.
*Example:*
language = "Python"
*π Integer "int"*
Used for whole numbers.
*Example:*
age = 25
*π Float "float"*
Used for decimal numbers.
*Example:*
price = 99.99
*π Boolean "bool"*
Used for True or False values.
*Example:*
is_online = True
*β¨ 4. Input & Output*
*π Output using "print()"*
*Example:*
print("Welcome to Python")
*π Input using "input()"*
*Example:*
city = input("Enter your city: ")
print(city)
π "input()" takes data from the user.
*β‘ 5. Operators in Python*
Operators are used to perform calculations.
*β Arithmetic Operators*
*Example:*
a = 10
b = 5
print(a + b)
print(a - b)
print(a * b)
print(a / b)
*π Output:*
15
5
50
2.0
*π 6. Comparison Operators*
Used to compare values.
*Example:*
x = 10
print(x > 5)
print(x == 10)
print(x < 3)
*π Output:*
True
True
False
*π 7. Type Conversion*
Convert one data type into another.
*Example:*
num = "100"
print(int(num) + 50)
*π Output:*
150
*Common conversions:*
- int()
- float()
- str()
- bool()
*π€ 8. Strings in Python*
Strings are text values.
*Example:*
text = "python programming"
print(text.upper())
print(text.lower())
print(len(text))
*π Output:*
PYTHON PROGRAMMING
python programming
18
*π 9. Lists in Python*
Lists store multiple values.
*Example:*
numbers = [10, 20, 30, 40]
print(numbers)
print(numbers[0])
*π Output:*
[10, 20, 30, 40]
10
*π 10. Dictionaries in Python*
Dictionaries store data in key-value format.
*Example:*
student = {
"course": "Python",
"duration": "3 Months"
}
print(student["course"])
*π Output:*
Python
*π Beginner Practice Tasks*
β
Create a calculator
β
Create a user input program
β
Store student marks in a list
β
Create a dictionary for product details
β
Convert string into integer
*π₯ Beginner Tips*
β Practice daily for 30 minutes
β Write code instead of only watching tutorials
β Learn by building mini projects
β Donβt fear errors β debugging is learning
Get ready for part 2 ππΎ g1 - O Portal de NotΓcias da globo Google G.V.Prakash Kumar