Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Programming Quiz

Total questions: 21

Worksheet time: 1hrs 29mins

Name
Class
Date
1.

Identify the type of the following data: 4343

a)

int(整数)

b)

float(浮点数)

2.

Identify the type of the following data: 43.53

a)

int(整数)

b)

float(浮点数)

3.

Identify the type of the following data: 0.0

a)

int(整数)

b)

float(浮点数)

4.

17%2

a)

1

b)

8

c)

8.5

5.

17//2

a)

8

b)

1

c)

8.5

6.

Identify the type of the following data: .54

a)

int(整数)

b)

float(浮点数)

7.

What is the result for: 3 ** 2 * 4

a)

36

b)

24

c)

12

8.

What is the result for: A or B and C

a)

0

b)

1

9.

What is the result for: (A or B) and C

a)

0

b)

1

10.

What is the result for: not A or not B and C

a)

0

b)

1

11.

What is the result for r?

a)

205

b)

410

c)

50

d)

35

12.

What is the output when X = 1?

a)

1

b)

0.5

c)

4

d)

9

13.

What is the output when X = 5?

a)

4

b)

9

c)

76

d)

3

14.

What is the output y when X = 99?

a)

0.01

b)

1

c)

无解

d)

10

15.

哪个变量/函数名是合法的?

a)

2Apple

b)

_4time

c)

def lambda():

16.

打印sum的值是?

a)

3

b)

9

c)

6

d)

1

17.

打印 i 的值是?

a)

2

b)

6

c)

1

d)

3

18.
4 lines
19.

1.     如果篮球从某一高度h=20落下,每次落地后反弹回原来高度的一半再落下。
那么球在第10次落地时,共经过多少米呢? 第10次反弹多高?

4 lines
20.

    2. 函数:一个人赶着鸭子去每个村庄卖,每经过一个村子卖去所赶鸭子的一半又一只。这样他经过了七个村子后还剩两只鸭子,问他出发时共赶多少只鸭子?经过每个村子卖出多少只鸭子?

4 lines
21.
  1. 3. 日本著名数学游戏专家中村义作教授提出这样一个问题:父亲将2520个桔子分给六个儿子。分完后父亲说:“老大将分给你的桔子的1/8给老二;老二拿到后连同原先的桔子分1/7给老三;老三拿到后连同原先的桔子分1/6给老四;老四拿到后连同原先的桔子分1/5给老五;老五拿到后连同原先的桔子分1/4给老六;老六拿到后连同原先的桔子分1/3给老大”。结果大家手中的桔子正好一样多。问六兄弟原来手中各有多少桔子?

4 lines