Learn Python in 80 Minutes
Classroom Presentation Based on
Udemy Course
Introduction to Python
• • High-level programming language
• • Easy to learn for beginners
• • Widely used in data science, web dev, AI,
etc.
Setting up Python
• • Install Python from [Link]
• • Use IDEs like PyCharm, VSCode, or Jupyter
Notebook
• • Verify installation with 'python --version'
Your First Python Program
• Example:
• print('Hello, World!')
Python Variables
• • Variables store data
• • No need to declare type explicitly
• Example:
• name = 'Alice'
• age = 25
Data Types
• • int, float, str, bool
• • list, tuple, dict, set
• Example:
• price = 19.99
• is_valid = True
User Input
• • Get input using input()
• Example:
• name = input('Enter your name: ')
• print('Hello', name)
Conditional Statements
• • if, elif, else
• Example:
• if age >= 18:
• print('Adult')
• else:
• print('Minor')
Loops - For
• • Used to iterate over sequences
• Example:
• for i in range(5):
• print(i)
Loops - While
• • Used when number of iterations not known
• Example:
• while x < 5:
• print(x)
• x += 1
Functions
• • Reusable blocks of code
• Example:
• def greet(name):
• print('Hello', name)
• greet('Alice')
Lists
• • Ordered, mutable collections
• Example:
• numbers = [1,2,3]
• [Link](4)
• print(numbers)
Tuples
• • Ordered, immutable collections
• Example:
• colors = ('red', 'blue', 'green')
Dictionaries
• • Key-value pairs
• Example:
• student = {'name':'Alice','age':25}
• print(student['name'])
Sets
• • Unordered unique items
• Example:
• fruits = {'apple','banana','apple'}
• print(fruits)
String Manipulation
• • Strings are sequences
• Example:
• text = 'Python'
• print([Link]())
• print(text[0])
Error Handling
• • Use try/except to handle errors
• Example:
• try:
• x = 10/0
• except ZeroDivisionError:
• print('Cannot divide by zero')
Modules and Imports
• • Use libraries to extend functionality
• Example:
• import math
• print([Link](16))
File Handling
• • Open, read, write files
• Example:
• with open('[Link]','r') as f:
• print([Link]())
Loops with Break/Continue
• • break: exit loop
• • continue: skip iteration
• Example:
• for i in range(5):
• if i==3: break
• print(i)
Fibonacci Function
• Example:
• def fibonacci(limit):
• a,b=0,1
• while a<=limit:
• print(a)
• a,b=b,a+b
Summary
• • Python basics: variables, types, conditions,
loops
• • Data structures: list, tuple, dict, set
• • Functions, error handling, files
• • Ready to build projects!