Learning Python

🐍 What is Python?
Python is a popular, easy-to-learn programming language used to tell the computer what to do. It is just like we use English, Hindi, or Marathi to talk to people — we use Python to talk to computers.
- Python the mostly used and popular programming language.
- It was discovered by Guido Van Rossum in 1991.
- It was named after Monty Python, a comedy show — not the snake 🐍!
🧠 Why is Python Famous?
Because it’s:
✅ Simple to read and write (almost like English!)
✅ Beginner-friendly
✅ Used for many things like:
Websites 🌐
Games 🎮
Machine Learning & AI 🤖
Data analysis 📊
Automating tasks ⚙️
🧩Installation
Python can be easily installed from python.org. When you click on the download button, Python can be installed after you complete the setup by executing the file on your platform.
– Install Visual Studio Code and the recommended Python extension.
📝 Syntax
Executive python syntax:-
python syntax can be executed by writing directly in the command line.”
It then provides an example:
>>> print (“Hello, World!”)
“Hello, World!”
🔢Python Variables
A variable is like a box where you can store something — like a number, a name, or anything else — and use it later in your program.
Example:
x = 5
y = “Hello, World!”
💬 Comments
Comments In python we can comment to a particular line (For the purpose of in-code documentation) and state the explanation of the code.
- Comments start with the notation “#“, and python will render the rest on the line as a comment.
- Comments can be used to explain Python Code.
- Comments can used to prevent execution when testing a code.
- These makes code easy to understand to multiple users.
- Example: #This is a comment.
🖨️ Print Statement
In Python, the print()
statement is used to display the output text or values on the screen.
Example: print(“Your text here”)
🔄 Casting
With the help of casting, we can specify the datatype of a variable.