Python - Print Statement-Code Walkthrough - Part 3 |

Veröffentlicht am: 11 März 2025
auf dem Kanal: Progra Coding school
34
1

1.
Printing Multiple Numbers
print(10, 20, 30)
print() Function: This is a built-in Python function used to display output.
Arguments (10, 20, 30): These are the values being passed to print().
They are separated by commas.

Default Separator (sep=" "): By default, print() separates multiple arguments with a single space.

2.

Printing Numbers and string

print("My age is", 12)
print(‘My age is’, 12)

print() Function: This is a built-in Python function used to display output.
Arguments: "My age is" (a string) and 12 (an integer).
Default Separator (sep=" "): By default, print() separates multiple arguments with a single space.

3
Printing a Repeated String
print("Python! " * 3)
String Multiplication (*): In Python, the * operator can be used for multiplying "Python! " is the string.
3 is the number of times the string will be repeated.
print() Function: This function will display the result.

4.
Print with separators-Double Quotes
print("Hello", "World", sep=" ")
print() Function: This function will display the result.
Arguments: "Hello" and "World" are two separate string values.
Separator Argument: The sep parameter defines what should be placed between the arguments.
Here, sep=" " (a single space) is the default behavior of print(), so it doesn't change anything.

5.
Print with hyphen separator
print('Hello', 'World', sep='-')
print() Function: This function will display the result.
Arguments: ‘Hello’ and ‘World’ are two separate string values using single quotes.
Separator Argument: The sep parameter defines what should be placed between the arguments.
Here, sep='-' places a hyphen (-) between 'Hello' and 'World'


6.
Print with underscore separator
print('Hello', 'World', sep='_')
print() Function: This function will display the result.
Arguments: ‘Hello’ and ‘World’ are two separate string values using single quotes.
Separator Argument: The sep parameter defines what should be placed between the arguments. Here, sep='_' places a underscore (_) between 'Hello' and 'World'

7.
Print with comma separator
print('Hello', 'World', sep=',')
print() Function: This function will display the result.
Arguments: ‘Hello’ and ‘World’ are two separate string values using single quotes.
Separator Argument: The sep parameter defines what should be placed between the arguments.
Here, sep=',' places a underscore (,) between 'Hello' and 'World'


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...

#KidsTechExplorer
#WhatIsAI
#ArtificialIntelligence
#TechForKids
#STEMEducation
#AIExplained
#LearnWithViyan
#FutureTech
#EdTech


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