盐焗小星球 发表于 2023-1-17 04:40:09

python简单多选题

几个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
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+myString
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+myString
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)]
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)

sfqxx 发表于 2023-1-17 14:52:18

你这些题哪里来的?{:10_277:}

wyhpylc 发表于 2023-1-18 09:59:14

这……对于一个英语不好的初二学生很难】

鱼cpython学习者 发表于 2023-1-23 22:08:59

cbccb bcfac
应该是对的

鱼cpython学习者 发表于 2023-1-23 22:09:39

wyhpylc 发表于 2023-1-18 09:59
这……对于一个英语不好的初二学生很难】

这些词算编程里的基础词语吧{:10_245:}

wyhpylc 发表于 2023-1-23 22:17:11

鱼cpython学习者 发表于 2023-1-23 22:09
这些词算编程里的基础词语吧

是基础,但是有一个或几个词不会,就影响我对全文的认知】
页: [1]
查看完整版本: python简单多选题