练习题目 共15题
1

 input函数可以接受用户输入的任何类型数据并将其原样返回


2

input函数总是返回一个字符串即便是用户输入的是数字


3

Python脚本中执行时input函数会阻塞程序直到用户提供输入


4

Python可以直接将input函数的返回值相加


5

使用input函数时必须提供提示文本


6

 input函数无法关闭或隐藏用户在终端中输入的数据


7

使用input函数读取密码是安全的因为它不会在屏幕上显示输入的内容


8

可以通过连续调用多次input函数来收集用户的多个输入


9

如何使用input函数让用户输入一个数字并将输入的数据存储为整数


  • A.

    int(input())

  • B.

    input().int()

  • C.

    input().toInt()

  • D.

    input().integer()

10

Python哪个函数用于从标准输入如键盘获取用户输入的数据


  • A.

     print()

  • B.

    input()

  • C.

    get()

  • D.

    read()

11

调用input函数后按下回车键会将用户输入的数据发送给程序input函数返回的数据类型是什么


  • A.

    列表

  • B.

    字典

  • C.

    字符串

  • D.

    整数

12

以下哪个选项可以正确使用input函数来获取一个字符串输入


  • A.

     input = "Enter text:"

  • B.

    input("Enter text:")

  • C.

     "Enter text:".input()

  • D.

    input >>"Enter text:"

13

当用户在input函数的提示下输入数据并按下回车键后该函数将


  • A.

    等待下一个input调用

  • B.

    返回用户输入的数据

  • C.

    直接结束程序

  • D.

    删除用户输入的数据

14

当使用input函数时用户可以输入哪种类型的数据


  • A.

    仅字符串

  • B.

    仅数字

  • C.

    字符串和数字

  • D.

    任何类型

15

Python以下哪个语句可以提示用户输入他们的年龄并将输入的值转换为整数


  • A.

    age = int(input("Enter your age: "))

  • B.

    age = input("Enter your age: ") int()

  • C.

    age = input "Enter your age: " int()

  • D.

    age = input("Enter your age: ")

答题卡
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15