鱼C论坛

 找回密码
 立即注册
查看: 2880|回复: 5

[已解决]python简单多选题

[复制链接]
发表于 2023-1-17 04:40:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
几个python简单多选题,求问正确答案
Q1. Which of the following functions that reads a data from the user and returns the same data as a string,
back to the program
a. eval_input()
b. output()
c. input()
d. str_input()
e. none of the above
Q2. What is the value of price after the execution of the following line:
price = int(68.549)
a. 69
b. 68
c. 68.55
d. 68.6
e. 68.549
Q3. Which of the if clauses below that determines whether y is in the range 2 through 6, inclusive?
a. if 2 < y or y > 6:
b. if 2 > y and y < 6:
c. if y >= 2 and y <= 6:
d. if y >= 2 or y <= 6:
e. none of the above
Q4. List all the values that the variable num contains through the iterations of the following for loop:
for num in range(2, 9, 2):
a. 2, 3, 4, 5, 6, 7, 8, 9
b. 2, 5, 8
c. 2, 4, 6, 8
d. 1, 3, 5, 7, 9
e. 2
Q5. How to load the contents of the random module into memory?
a. random
b. import random
c. load random
d. download random
e. none of the above
Q6. For myString = [["1","a"],0,[""]], what is the output of the following line:
myString[0][0][0]
a. 0
b. 1
c. a
d. ["1","a"]
e. [["1","a"],0,[""]]
f. [['1', 'a'], 0]
Q7. For myString = [["1","a"],0,[""]], what is the output of the following line:
myString[0][1]+myString[2][0]
a. 0
b. 1
c. a
d. ["1","a"]
e. [["1","a"],0,[""]]
f. [['1', 'a'], 0]
Q8. For myString = [["1","a"],0,[""]], what is the output of the following line:
myString[0:1]+myString[1:2]
a. 0
b. 1
c. a
d. ["1","a"]
e. [["1","a"],0,[""]]
f. [['1', 'a'], 0]
Q9. For myString = [["1","a"],0,[""]], what is the output of the following line:
myString[int(myString[0][0])]
a. 0
b. 1
c. a
d. ["1","a"]
e. [["1","a"],0,[""]]
f. [['1', 'a'], 0]
Q10. class Dog:
def __init__(self, name, age):
self.name = name
self.age = age
The correct way to instantiate the above Dog class is:
a. Dog.create("Rufus", 3)
b. Dog()
c. Dog("Rufus", 3)
d. Dog.__init__("Rufus", 3)
最佳答案
2023-1-23 22:09:39
wyhpylc 发表于 2023-1-18 09:59
这……对于一个英语不好的初二学生很难】

这些词算编程里的基础词语吧
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-1-17 14:52:18 | 显示全部楼层
你这些题哪里来的?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 0

使用道具 举报

发表于 2023-1-18 09:59:14 | 显示全部楼层
这……对于一个英语不好的初二学生很难】
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-23 22:08:59 | 显示全部楼层
cbccb bcfac
应该是对的
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-23 22:09:39 | 显示全部楼层    本楼为最佳答案   
wyhpylc 发表于 2023-1-18 09:59
这……对于一个英语不好的初二学生很难】

这些词算编程里的基础词语吧
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-23 22:17:11 | 显示全部楼层
鱼cpython学习者 发表于 2023-1-23 22:09
这些词算编程里的基础词语吧

是基础,但是有一个或几个词不会,就影响我对全文的认知】
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-9-24 21:28

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表