What is Python?
Installing Python and setting up the environment
Writing and running your first Python program
print("Hello, World!")
Variables and Data Types
x = 10
y = 3.14
name = "Saikiran"
is_student = True
Basic Operations
sum = x + y
difference = x - y
product = x * y
quotient = x / y
Taking User Input
name = input("Enter your name: ")
print("Hello, " + name + "!")
If, Elif, and Else Statements
age = int(input("Enter your age: "))
if age >= 18:
print("You are an adult.")
elif age > 12:
print("You are a teenager.")
else:
print("You are a child.")
For Loops
for i in range(5):
print(i)
While Loops
count = 0
while count < 5:
print(count)
count += 1
Defining and Calling Functions
def greet(name):
print("Hello, " + name + "!")
greet("Saikiran")