Program 1
Program 1
1. Introduction to Python
Python is a popular, beginner-friendly programming language.
Known for its simplicity and readability.
Used for web development, data analysis, AI, scientific computing, and more.
2. Python Basics
a) Running Python
Install Python from python.org.
Use an IDE (like PyCharm, VS Code) or a simple text editor.
Run Python code:
o In the Python interpreter (>>>).
o By saving code in a .py file and running python filename.py in the terminal.
b) Basic Syntax
Python uses indentation (not braces {} or semicolons ;)
*********************************************************************
if 5 > 3:
print("5 is greater than 3") # Indented block
**********************************************************************
c) Comments
Use # for single-line comments.
Use triple quotes for multi-line comments.
*****************************************************************
# This is a single-line comment.
"""
This is a multi-line comment.
"""
****************************************************************