wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python1

Total questions: 56

Worksheet time: 1hrs 4mins

Name
Class
Date
1.

Python language was developed in what year?

a)

1985

b)

2001

c)

1991

d)

1820

2.

Какой язык программирования ты учил последние полгода?

a)

Python

b)

Delphi

c)

C/C++

d)

PHP

3.

Для вывода сообщений на екран консоли используеться функция:

a)

input()

b)

print()

c)

int()

d)

string()

4.

Для преоброзования даных в число испульзуется функция:

a)

string()

b)

print()

c)

input()

d)

int()

5.

Для преоброзования даных в текст используется функция:

a)

string()

b)

input()

c)

print()

d)

int()

6.

Для развлетвения используется:

a)

if

b)

while

c)

for

d)

def

7.

Перед названием функции должно быть:

a)

def

b)

for

c)

if

d)

while

8.

Для цикла используют:

a)

if

b)

while

c)

def

d)

class

9.

Для создания класса используют ключевое слово:

a)

for

b)

class

c)

if

d)

while

10.

> – это следующий знак:

a)

больше

b)

меньше

c)

больше или равно

d)

меньше или равно

11.

< – это следующий знак:

a)

больше

b)

меньше

c)

больше или равно

d)

меньше или равно

12.

Что будет выведено на экран?

a)

42 + 5

b)

42

c)

47

d)

5

13.

Что будет выведено на экран?

a)

You are a Rodion! I don't know you!

b)

You are a stranger! I don't know you!

c)

Hello, Kyrylo!

d)

Hello, Rodion!

14.

Что будет выведено на экран?

a)

42 + 5

b)

42

c)

Mamkin hatzker!

d)

Rodion

15.

Символ переходан на новую строку

a)

\v

b)

\t

c)

\n

d)

\r

16.
What is python named after
a)
The snake
b)
Television show called Monty Python
17.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
18.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
19.
What button do you press to compile (run) your program so that it runs in the shell?
a)
F3
b)
F5
c)
F7
d)
F9
20.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
21.
What does the print function do in python?
a)
It's a variable.
b)
It can input data.
c)
It displays something like a string or integer
d)
It loops the code.
22.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
23.
What syntax can you use to insert a line break between strings so that they appear over multiple lines?
a)
/
b)
\n
c)
\l
d)
n
24.

Оператор вывода -

a)

print

b)

write

c)

input

d)

read

25.

Оператор ввода -

a)

print

b)

input

c)

read

d)

write

26.

Ветвление начинается со слова:

a)

while

b)

for

c)

if

d)

elif

27.

Где правильно записан оператор ввода целого числа 3 в переменную a?

a)

a = int(input(3))

b)

a = float(input(3))

c)

int(input(a))

d)

a = int(input())

28.

Какие операторы выведут 123?

a)

print(123)

b)

print('123')

c)

print(12, 3, sep='"")

d)

print(1, 2, 3)

29.

Какие циклы выполнятся 5 раз?

a)

for i in range(5):

b)

for i in range(0, 5):

c)

for i in range(1, 5):

d)

for i in range(0, 10, 2):

30.

Чему будет равно значение переменной s после выполнения цикла?

a)

-30

b)

40

c)

0

d)

70

31.

Что выведет эта программа?

a)

1 2 3 4 5 6 7 8 9 10

b)

2 4 6 8 10

c)

4 6 8 10 12

d)

2 4 6 8 10 12 14 16 18 20

32.

Что это?

a)

Полное ветвление

b)

Неполное ветвление

c)

Каскадное ветвление

d)

Структурное ветвление

33.

Какой код записан без ошибки?

a)
b)
c)
d)
34.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
35.

What is the Python built-in function used to display numbers and text on the screen?

a)

print

b)

input

c)

output

d)

command

36.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
37.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
38.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
39.

If you want to create an empty list called colours in Python, which of the following is correct?

a)

colours = [ ]

b)

colours = ( )

c)

colours = { }

d)

colours = <>

40.
What letter will be printed on the screen after running this code:
a)
e
b)
x
c)
t
d)
Nothing prints
41.
What is the position of the name "Robert" in the following list:
a)
0
b)
1
c)
2
d)
3
42.
What does the APPEND procedure do in the following code:
a)
Adds Liverpool to the beginning of the list
b)
Replaces Bristol with Liverpool
c)
Replaces Manchester with Liverpool
d)
Adds Liverpool to the end of the list
43.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
44.

Each item in a list has an index. What is the first index in a Python list?

a)

0

b)

1

c)

a

d)

A

45.
What output will this code produce?
a)
4
b)
2
c)
3
d)
5
46.
What output will this code produce?
a)
3
b)
20
c)
25
d)
17
47.
What output will this code produce?
a)
1
b)
3
c)
2
d)
4
48.

What will the output be from the following code?

print(3+4)

a)

3+4

b)

7

c)

SyntaxError

d)

print(3+4)

49.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
50.

What will the output be from the following Python code?

Print("Hello world!")

a)

NameError

b)

Hello world!

c)

"Hello world"

d)

Print(Hello world!)

51.

What will the output be from the following Python code?

print(9/3)

a)

3

b)

3.0

c)

9/3

d)

SyntaxError

52.

What will the output be from the following Python code?

print(Hello world!)

a)

Hello world!

b)

SyntaxError

c)

Hello world

d)

print(Hello world!)

53.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
54.

What is the Python built-in function to converts a number to a string?

a)

str()

b)

int()

c)

parseInt()

d)

convert

55.
The correct way to write a variable in Python?
a)
my_variable = 10
b)
my variable = 10
c)
my_variable is 10
d)
my_variable: 10
56.

Which of these is correct Python conditional statement?

a)

IF answer == "Yes":

b)

if answer == "Yes"

c)

if answer == "Yes":

d)

if answer = "yes":