Home
BeelForge-IOT
Hire Me
© 2025 BeelForge. All rights reserved.

🐍 Python Notes & Roadmap

Values and Types
print(type(10))       # int
print(type(3.14))     # float
print(type("Hello"))  # str
print(type(True))     # bool
Variables
x = 5
name = "Alice"
is_happy = True
Input Example
name = input("Enter your name: ")
print("Welcome,", name)

Band Name Generator
city = input("City you grew up in: ")
pet = input("Pet's name: ")
print("Your band name:", city + " " + pet)

If Statement
age = 18
if age >= 18:
    print("You are an adult")

Defining Functions
def greet(name):
    print("Hello", name)
Return Example
def square(x):
    return x * x
print(square(4))

For Loop
for i in range(5):
    print("Iteration", i)
While Loop
count = 0
while count < 5:
    print(count)
    count += 1

Lists
fruits = ["apple", "banana", "cherry"]
fruits.append("orange")
print(fruits)
Dictionaries
student = {"name": "Ali", "age": 20}
print(student["name"])
student["age"] = 21