Introduction to Python Programming ppt
Introduction to Python Programming ppt
Programming
By Aparna Samantaray
What is Python?
Python
for i in range(5):
print(i)
Key Features of Python
• Easy to Learn and Use: Simple, human-readable syntax.
Example:
def greet(name):
return "Hello " + name
print(greet("Alice"))
Output:
Hello Alice
Python Lists and Loops
Example:
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
print(fruit)
Output:
apple
banana
cherry
Python Libraries and Modules
Example:
import math