What is Python
Python is a high-level, general-purpose programming language.
It is known for its clear syntax, readability, and versatility.
Python is widely used for web development, data science, machine learning,
and automation.
Getting Started
Install Python: Download and install it from [Link]
Choose a text editor: A program to write code, like Visual Studio Code, Jupyter Notebook, PyCharm,
or even a simple text editor like Notepad.
Text editor for Android: Pydroid 3 - IDE for Python 3
o Video: How to: Install Jupyter Notebook on an Android device
Interactive mode: Experiment with Python directly in your terminal or command prompt using the
python command.
Important: Python source code files always use the .py extension.
How To Use Print() Function in Python
It is used to display text to the console, or to a file. The print() function can take one or more
arguments, and it can be used to format text in a variety of ways.
Example #1:
message = 'Python is fun'
# print the string message
print(message)
Output:
Python is fun
Example #2:
# Print a string:
print("Hello, World!")
# Print a number:
print(10)
# Print a variable:
x=5
print(x)
# Print multiple objects on the same line:
print("Hello", "World")
# Print multiple objects on separate lines:
print("Hello")
print("World")
# Print with a custom separator:
print("Hello", "World", sep=", ")
# Print with a custom ending character:
print("Hello", "World", end="!")