Introduction and Basics in Python
What is Programming? Just like we use Hindi or English to communicate with each other, we use a Programming language to communicate with the computer.
Programming is a way to instruct the computer to perform various tasks.
What is Python? Python is a simple and easy-to-understand language that feels like reading simple English. This Pseudo code nature of Python makes it easy to learn and understandable for beginners.
Features of Python:
- Easy to understand = Less development time
- Free and open source
- High-level language
- Portable – works on Windows/Linux/Mac
- It is a case-sensitive language.
Installation of Python Python can be easily installed from python.org.
When you click on the download button, python can be installed right after you complete the setup by executing the file for your platform.
What is Line Continuation? In Python, statements are normally written in a single line.
But sometimes, a statement becomes too long, and we want to split it across multiple lines to improve readability.
👉 To do that, we use a backslash (\) at the end of the line.
It tells Python that the statement continues on the next line.
Example: Basic usage.
Python
# Using backslash for line continuation
total = 1 + 2 + 3 + 4 + 5 + 6 + 7 + \
4 + 5 + 6
print(total) Output: 43