Python Presentation
Python Presentation
K Harisai,
Executive Committee Member, Swecha,
Senior Software Engineer, Syncoffice
Agenda
● Easy to learn
● Versatile(can be used for developing wide range of applications)
● Large Community
● Cross platform Compatibility
● Interpreted Language
● Great for Rapid Prototyping
● https://www.python.org/downloads/
Running Python Code
● There are several ways to run the python code on different development
environment.
● There are 3 types of environments.
– Text editors.
– Full IDEs.
– Notebook environments.
Python syntax
my_list = ["apple", "banana", "cherry"] my_dict = {"name": "John", "age": 30, "city": "New
York"}
print(my_list[1])
print(my_dict["age"])
# Tuple
print(my_tuple[1])
Operators
print(a / b) print(a != b)
print(a % b)
Control Flow Statements:
x=5 x=0
for i in range(5):
if x > 0:
print(i) while x < 5:
print("x is positive")
print(x)
elif x < 0:
x += 1
print("x is negative")
else:
print("x is zero")
Functions:
def say_hello(name):
say_hello("John")
File Handling
def say_hello(name):
print(math.sqrt(16))
# main.py
import mymodule
mymodule.say_hello("John")
Python Oops
Questions