“Функция печати в Python” Ответ

Python Print

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

Как использовать функцию печати в 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

Печать в Python

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

Функция печати в Python

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

Функция печати в 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

Функция печати в 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

Ответы похожие на “Функция печати в Python”

Вопросы похожие на “Функция печати в Python”

Больше похожих ответов на “Функция печати в Python” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования