Python - Print Statement-Code walk through - Part 1

Veröffentlicht am: 25 Februar 2025
auf dem Kanal: Progra Coding school
32
3

1.Print with multiple values

print("Hello", "World")

Here multiple values are passed as texts “Hello” is the first text or argument and “World” is the second text or argument .

print("Hello", "How",”Are” , “You”)

Here multiple values are passed as texts “Hello” is the first text or argument and “How” is the second text or argument and so on.

2.Print statement with Single Quotes

print('Hello World')


'Hello World' is a string enclosed in single quotes (' ')
Python allows both single quotes (' ') and double quotes (" ") for strings.

3. Print multiple lines with double quotes

print(""" Multi line
statement . Going to
Third line """)

Python allows multi-line strings using triple double quotes (""" """) or triple single quotes (''' ''').
The text is printed exactly as written, preserving new lines and spacing.

4. Print multiple lines with single quotes
print(''' Multi line
statement . Going to
Third line ''')

Python allows multi-line strings using triple double quotes (""" """) or triple single quotes (''' ''').

5. Print statement in upper case
PRINT("Hello world")

Python is case-sensitive.
PRINT() will cause an error because Python does not recognize it as a built-in function.
The correct function is print(), all lowercase.
We will get “NameError: name 'print1' is not defined”

6.Non-existent Function
print1("Hello World")

print1 non-existent Function.print1 is not a built-in Python function.
We will get “NameError: name 'print1' is not defined”

7.Print statement with Missing parentheses

print "Hello, World!"

In Python 2, print was a statement, so print "Hello, World!" was valid.
In Python 3, print became a function, requiring parentheses
Syntax error will be thrown “SyntaxError: Missing parentheses in call to 'print'.”


Enrollment and Contact Information:
Interested in enrolling your child at Progra Kids Coding School? For more information about our programs, admissions, and upcoming sessions, please get in touch with us:

   / @progra-coding-school  
  / progra.coding.school  

📞 Phone: +91 9566266696
📧 Email: info@progra.in
🌐 Website: www.progra.in

Address:
Progra Kids Coding School,
128, 12th cross street,
Kamarajar Nagar,
Perungudi,
Chennai-96
Map : https://maps.app.goo.gl/CALbVj4SDbo4v...

#python #pythonprogramming #pythonforbeginners #codingforkids #education
#python for kids
#python for beginners
#python full course
#python code
#python for beginners
#python full course in english
#python tutorial
#python project
#python programming
#python full course for kids
#python course
#python for beginners in english


Auf dieser Seite können Sie das Online-Video Python - Print Statement-Code walk through - Part 1 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Progra Coding school 25 Februar 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 32 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!