Python - Print Statement-Code Walkthrough - Part 3 |

Publié le: 11 mars 2025
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne Python - Print Statement-Code Walkthrough - Part 3 | durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Progra Coding school 11 mars 2025, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 34 fois et il a aimé 1 téléspectateurs. Bon visionnage!