Week 1: Introduction to Python
Basics, Installation, and First Program
What is Python?
• • High-level, interpreted programming
language
• • Created by Guido van Rossum in 1991
• • Emphasizes code readability with simple
syntax
• • Open-source and community-driven
Features of Python
• • Easy to learn and use
• • Interpreted and dynamically typed
• • Large standard library
• • Cross-platform compatibility
• • Supports multiple programming paradigms
(OOP, Functional, Procedural)
• • Vast community support
Applications of Python
• • Web Development (Django, Flask)
• • Data Science and Machine Learning (NumPy,
Pandas, TensorFlow)
• • Artificial Intelligence
• • Desktop GUI(Graphical User Interface)
Applications
• • Automation and Scripting
• • Game Development
• • Networking and Cybersecurity
Installing Python & IDEs
• • Download Python from [Link]
• • Use built-in IDLE for basic programming
• • Popular IDEs(Integrated Development
Environment) and Editors:
• - PyCharm (Professional/Community)
• - VS Code (Lightweight, extensions)
• - Jupyter Notebook (Data Science,
interactive)
Writing and Running First Python Program
• Example:
• print('Hello, World!')
• Steps:
• 1. Open IDE or text editor
• 2. Write code
• 3. Save file with .py extension
• 4. Run using Python interpreter
Understanding Python Syntax and
Indentation
• • No semicolons or braces required
• • Indentation defines code blocks
• Example:
• if True:
• print('Indented block’)
• • Consistent indentation is crucial
• • Typically 4 spaces used