Python Basics Lesson 1: Hello Python!
1. Print Statement
Python- screen- :
print("Hello, Amala Rose!")
print("Welcome to Ethical Hacking!")
2. Variables ( )
name = "Amala"
age = 21
is_hacker = True
print("Name:", name)
print("Age:", age)
print("Is hacker?", is_hacker)
3. If-Else (decision making)
age = 21
if age >= 18:
print("You are eligible to learn hacking.")
else:
print("You are too young!")
4. Loops (repeat actions)
for i in range(1, 6):
print("Hack attempt:", i)
5. Input (user input)
name = input("Enter your name: ")
print("Hello", name)
Practice :
Go to [Link] Create new Python project Paste above code and Run it!
Ready , Lesson 2 (Operators, Lists, Functions, etc.) .