0% found this document useful (0 votes)
7 views2 pages

What Is Python

Python is a high-level, general-purpose programming language known for its clear syntax and versatility, widely used in web development, data science, and automation. To get started, users should install Python, choose a text editor, and can experiment in interactive mode. The document also explains the usage of the print() function with examples demonstrating how to display text, numbers, and variables.

Uploaded by

bsidra897
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

What Is Python

Python is a high-level, general-purpose programming language known for its clear syntax and versatility, widely used in web development, data science, and automation. To get started, users should install Python, choose a text editor, and can experiment in interactive mode. The document also explains the usage of the print() function with examples demonstrating how to display text, numbers, and variables.

Uploaded by

bsidra897
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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="!")

You might also like