Menu

Python Day Two : The Start of Real Coding
🖼️

Python Day Two : The Start of Real Coding

DEV Community: beginners·Amina·5 months ago
#cHqDDJjs
#dev#print#enter#exit#photo
Reading 0:00
15s threshold

Python Day Two : Python Output & Print

print() is a Python🐍 command used to show something on the screen.

Example:

print ( " Pure Pearl Foundation " )

Enter fullscreen mode

Exit fullscreen mode

print → tells Python to display output

"Pure Pearl Foundation" → the text to show on the screen

Text must be inside quotation marks " "

Output:

Pure Pearl Foundation

Enter fullscreen mode

Exit fullscreen mode

Print Number

print() can also display numbers in Python.

Example:

print ( 70 ) print ( 80 ) print ( 90 )

Enter fullscreen mode

Exit fullscreen mode

Explanation:

Numbers are written without quotation marks.

Python treats them as real numbers, not text.

Each print() shows the number on a new line.

Output:

70 80 90

Enter fullscreen mode

Exit fullscreen mode

Calculation

You can do calculations directly inside print() in Python.

Example:

print ( 10 + 10 ) print ( 20 - 20 ) print ( 50 / 5 ) print ( 5 * 5 )

Enter fullscreen mode

Exit fullscreen mode

Explanation:

+ means addition

-…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.