2.Text input and output

简介: 文本的输入和输出 输出 要在屏幕上输出文本你需要这样一行代码: print("Hello World") 如果输出多行,要添加符号“\n”: print("Hello World\nThis is a message") 输出值的话: x = 3 print(x) 输出多行数值: ...
文本的输入和输出
输出
要在屏幕上输出文本你需要这样一行代码:
print("Hello World")
如果输出多行,要添加符号“\n”:
print("Hello World\nThis is a message")
输出值的话:
x = 3
print(x)
输出多行数值:
x = 2
y = 3
print(x, ' ', y)
 
输入
得到一个文本值(字符?):
name = input("Enter a name: ")
得到一个整数:
x = int(input("What is x? "))
得到一个小数:
x = float(input("Write a number"))
 
目录
相关文章
A+B for Input-Output Practice
A+B for Input-Output Practice
(standard input): No keywords in input file
(standard input): No keywords in input file
110 0
解决AssertionError: size of input tensor and input format are different.tensor shape: (3, 138input_for
解决AssertionError: size of input tensor and input format are different.tensor shape: (3, 138input_for
395 0
|
前端开发
使input type=“text“不可编辑
使input type=“text“不可编辑
312 0
使input type=“text“不可编辑
open a BP will trigger text load - COM_TEXT_MAINTAIN - READ_TEXT
open a BP will trigger text load - COM_TEXT_MAINTAIN - READ_TEXT
open a BP will trigger text load - COM_TEXT_MAINTAIN - READ_TEXT
|
XML 数据格式
Adobe form batch output print mode - multiple
Customer wants to render the body page 4 times on 4 different master page in one PDF. Take “Invoice” as example, the first copy will be printed on master page with text “for Customer”, the second copy will be printed on master page with text “for archive”.