0% found this document useful (0 votes)
1 views1 page

Python Beginner Notes

The document contains a series of Python code snippets demonstrating basic programming concepts. It includes printing messages, variable assignments, conditional statements, loops, function definitions, and user input handling. Overall, it serves as a simple introduction to Python syntax and functionality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Python Beginner Notes

The document contains a series of Python code snippets demonstrating basic programming concepts. It includes printing messages, variable assignments, conditional statements, loops, function definitions, and user input handling. Overall, it serves as a simple introduction to Python syntax and functionality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

print("Hello World")

name = "Preetam"
age = 16
print(name, age)

name = input("Enter your name: ")


print("Hello", name)

age = 18
if age >= 18:
print("Adult")
else:
print("Minor")

for i in range(1,6):
print(i)

def add(a, b):


return a + b

print(add(5, 3))

fruits = ["apple", "banana", "mango"]


print(fruits[0])

a = int(input("Enter first number: "))


b = int(input("Enter second number: "))
print("Sum =", a + b)

You might also like