【题解】Quiz 8 (An Introduction to Interactive Programming in Python)

吐槽:mdzz刷了三遍才满分....

题目:

1. Which of the following is valid notation for a set in CodeSkulptor?

A. set([])

B. set()

C. {1, 2, 3}

AB,可以使用大括号 { } 或者 set() 函数创建集合,注意:创建一个空集合必须用 set() 而不是 { },因为 { } 是用来创建一个空字典。(https://www.runoob.com/python3/python3-set.html)对于C选项:While valid in Python 2.7 or 3.X, it is not valid in Python 2.6 or CodeSkulptor.

2. Which of the following operations can mutate set s? You may want to try some examples in CodeSkulptor and refer to the documentation.

A. s.update(s)

B. s.pop()

C. t.difference(s)

D. s.union(t)

E. s.difference_update(t)

F. t.intersection_update(s)

BE,可以在python里面试一下这最快捷,也可参考文档(https://www.runoob.com/python3/python3-set.html)。

3. How many frames per second are typically projected in modern movies? How many times per second is the draw handler typically called in CodeSkulptor?

Enter two numbers representing these frame rates in frames per second. Use only spaces to separate the numbers.

24 60

电影放映的标准是每秒放映24帧,每秒遮挡24次,刷新率是每秒48次。这里的帧就是画面,也就是说电影每秒放映24幅画面,以达到动画的效果(https://zhidao.baidu.com/question/540382352.html)。

4. Consider a horizontally-tiled image where each sub-image has the same size. If each sub-image is of size 60×90 (in pixels), what is the horizontal distance (in pixels) between the centers of adjacent sub-images?

A. 60

B. 180

C. 90

D. 120

A,两个格子中心点的距离等于一个格子的边长。

 

你可能感兴趣的:(题解,Python)