Introduction to Python
Basics for Beginners
Your Name / Institution
What is Python?
• • High-level, interpreted programming
language.
• • Easy to read and write, beginner-friendly.
• • Used in web development, data science,
automation, AI, etc.
Installing Python
• • Download from python.org
• • Use Anaconda for data science applications.
• • Run Python using IDLE, Jupyter Notebook, or
VS Code.
Writing Your First Python Program
• print("Hello, World!")
• • print() function displays output.
Variables & Data Types
• • int (e.g., 10)
• • float (e.g., 3.14)
• • str (e.g., 'Python')
• • bool (e.g., True, False)
User Input
• name = input("Enter your name: ")
• print("Hello, " + name + "!")
Conditional Statements
• if x > y:
• print('x is greater than y')
• elif x == y:
• print('x is equal to y')
• else:
• print('x is less than y')
Loops in Python
• • For Loop:
• for i in range(5):
• print(i)
• • While Loop:
• count = 0
• while count < 5:
• print(count)
• count += 1
Functions in Python
• def greet(name):
• return 'Hello, ' + name
• print(greet('Alice'))
Lists and Dictionaries
• • List: fruits = ['apple', 'banana', 'cherry']
• print(fruits[0])
• • Dictionary: person = {'name': 'Alice', 'age':
25}
• print(person['name'])
File Handling in Python
• with open('test.txt', 'w') as f:
• f.write('Hello, Python!')
Conclusion & Next Steps
• • Recap key concepts.
• • Explore Python libraries like NumPy, Pandas,
and Tkinter.
• • Practice with small projects.
Q&A
• Open floor for questions.