“Función de impresión en Python” Código de respuesta

impresión de python

x = 10
y = 5
print(x)			# 10
print("x is ",x)	# x is 10
print(x,y)			# 10 5
print("sum of", x, "and", y, "is", x+y)   # sum of 10 and 5 is 15
mCar = "A"
print(mCar * y) 	# AAAAA
VasteMonde

Cómo usar la función de impresión en Python

print("What you would like to print :D")

#And then it will print in my case "What you would like to print :D" in the output
Jeppe Pro

Imprimir en Python

print("the sentence you want to print")
Expensive Emu

Función de impresión en Python

print("hello, this is print function")
Coding boy Hasya

Función de impresión en Python

# How to print in Python
print("Hello World!")
# How to print multiple words using comma separator
print("Hi", "there")
# How to separate the objects if there is more than one.
print("Chelsea","Liverpool", sep="-vs-")
#Specify what to print at the end. Default is '\n'
print("Hello World",end="!") 
# or use empty string "" for no new line
print("Hello World",end="")
Eugenio Carmo

Función de impresión en Python

2 + 1
#Addition is done by Python, but doesn't show us the answer

print(2 - 1)
#output - 1 (This will solve and show us the answer, 2,1 and 3 all are integers)

x = 2 * 1
print(x)
#output - 2 (We have printed the varible and got the answer, all are integers)

x = 2
y = 1
print(x / y)
#output - 2.0 (When division is done answer is given as a float)

x = "2"
y = "1"
print(x + y)
#output - 21 (When two strings are added, it concatenate and the answer 
# is also a string)
Rajitha Amarasinghe

Respuestas similares a “Función de impresión en Python”

Preguntas similares a “Función de impresión en Python”

Más respuestas relacionadas con “Función de impresión en Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código