Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

100-200 Жоғары деңгейлі тілдерде программалау (ағылшын тілінде)

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

Method for describing an algorithm that shows the content of actions performed in natural language:

a)
Oral.
b)
Oral-formulaic.
c)
Flowchart.
d)
Pseudocode.
e)
Structured diagram.
2.

Block diagram element:

a)

b)

/

c)

*

d)

!

e)

3.
a)
A=10, B=20, С=30, max=30.
b)
A=1, B=12, С=23, max=12.
c)
A=100, B=-20, С=30, max=-100.
d)
A=10000, B=-2, С=20, max=3000.
e)
A=100, B=-10, С=-200, max=-200.
4.
a)
A=1, B=1, S= 1.
b)
A=-1, B=2, S=-3.
c)
A=-1, B=3, S=-6.
d)
A=1, B=1, S= 2.
e)
A=1, B=2, S= 5.
5.
a)
N=1, P=1.
b)
N=-2, P= -1.
c)
N=-3, P=-2.
d)
N=1, P=0.
e)
N=2, P=0.
6.
What structure is shown in the picture?
a)
Precondition loop.
b)
Condition statement.
c)
Execute the loop body while the condition is false.
d)
Postcondition loop.
e)
Counter loop.
7.
What structure is given in the picture?
a)
Full selector.
b)
Loop executes until the condition is false.
c)
Repetition operator.
d)
Postcondition loop.
e)
IF condition THEN action 3 ELSE action 2;.
8.
a)
Conditional structure.
b)
Precondition loop.
c)
Postcondition loop.
d)
Loop body executes while the condition is true.
e)
If - then - else.
9.
Basic algorithmic structure:
a)
Search.
b)
Insertion.
c)
Selection.
d)
Process.
e)
Typical process.
10.
For which values of A and B is the left branch executed (the executable command is highlighted with color):
a)
A=7, b=4.
b)
A=-17, b=-10001.
c)
A=-87, b=70.
d)
A=7, b=7.
e)
A=70, b=7.
11.
For which values of A and B is the right branch executed (the executable command is highlighted with color):
a)
A=7 b=7.
b)
A=7 b=4.
c)
A=17 b=-10.
d)
A=87 b=0.
e)
A=70, b=7.
12.
Under what condition of N will the value of variable K be equal to 3:
a)
N=3333.
b)
N=3.
c)
N= 345.
d)
N=0.
e)
A=70, b=7.
13.
a)
An error occurs on line 2
b)
qwe
c)
awe
d)
aqwe
e)
An error occurs on line 3
14.
Block table - :
a)
A graphical representation of an algorithm.
b)
Directed graphs that do not show the sequence of algorithm commands, vertices can be of one of three types.
c)
A set of operators.
d)
Instructions written in a language understandable to the executor.
e)
Figures.
15.
Types of vertices in a block chart:
a)
Functional.
b)
Structural.
c)
Operators.
d)
Left.
e)
Right.
16.
A branching (decision) structure can be represented in an algorithm in the following forms:
a)
Incomplete selector.
b)
Search.
c)
Pass-through.
d)
Counter-controlled loop.
e)
Linear structure.
17.
«Similar» structure:
a)
Вариант 1
b)
Вариант 2
c)
Вариант 3
d)
Вариант 4
e)
Вариант 5
18.
«Similar» structure:
a)
Вариант 1
b)
Вариант 2
c)
Вариант 3
d)
Вариант 4
e)
Вариант 5
19.
Indicate the structural part of the algorithm representing the repetition algorithm, consisting of composition and similarity:
a)
Вариант 1
b)
Вариант 2
c)
“Step” is not a structure.
d)
Branching structure.
e)
Linear structure.
20.
Types of vertices in a block chart:
a)
Вариант 1
b)
Вариант 2
c)
Вариант 3
d)
Вариант 4
e)
Вариант 5
21.

The time complexity of a construct is calculated using the following formula:

a)
The time complexity of the “Search” construct is obtained by summing the blocks.
b)
Вариант 2
c)
Вариант 3
d)
The time complexity of the “Search” construct arises from the derivative of the blocks
e)
Вариант 5
22.
a)

Fa(n)=1+1+ n *(3+1+ n *(3+4)).

b)
Fa(n)= 7*n*n+4* n -2 .
c)
Fa(n)= (n/n).
d)
Fa(n)=1+ n *(3+1+ n *(3+4)).
e)
Fa(n)=n *(3+1+ n *(3+4)).
23.
a)
O(n²).
b)
O(n*n)n*n.
c)
Not quadratic.
d)
O(n³).
e)
O(e^n).
24.
a)
Вариант 1
b)
Вариант 2
c)
Вариант 3
d)
Вариант 4
e)
Вариант 5
25.

Select the correct understanding:

a)
b)
Вариант 2
c)
Вариант 3
d)
Вариант 4
e)
Вариант 5
26.

Calling the func method in the following class: class myClass: def func(self): print('hello')

a)
obj = myClass() obj.func()
b)
myClass.func()
c)
obj = myClass() obj.func
d)
obj = myClass()
e)
myClass() obj.func
27.
Shown in the picture:
a)
Basic algorithmic structures.
b)
Call within the program body.
c)
Search.
d)
Branching.
e)
Function call.
28.
Correct statement …:
a)
Array elements are sorted in ascending order: a[1]
b)
Array elements are not sorted in descending order: a[1]<=a[2]<=. . . <=a[n+6];.
c)
Array elements are sorted in descending order: a[1]
d)
Array elements are sorted in ascending order: a[1]>a[2]<. . . >a[n];.
e)
Array elements are sorted in ascending order: a[1]>a[2]>. . . >a[n];.
29.
The procedure sequentially goes through all elements and ends by displaying them, with comparisons made against X:
a)
Linear search.
b)
Linear search with a barrier.
c)

d)

e)

30.
Search with a barrier:
a)
Вариант 1
b)
Вариант 2
c)
Вариант 3
d)
Вариант 4
e)
Вариант 5
31.
The main methods of writing an algorithm are as follows:
a)
Graphical.
b)
Oral-formulaic, written.
c)
Programming.
d)
Symbolic.
e)
Numeric.
32.
Indicate the properties of an algorithm:
a)
Effectiveness – Ensures obtaining the result by performing the final step.
b)
Convenience – The algorithm should be divided into a sequence of individual steps.
c)
Applicability – The algorithm should be applicable to the initial data and the desired result.
d)
Discreteness – Ensures the result is obtained by a finite number of steps.
e)
Determinacy – The algorithm should be divided into a specific number of individual steps.
33.
Main properties of an algorithm:
a)
Effectiveness.
b)
Initial.
c)
Final.
d)
Linear.
e)
Sequential.
34.
Algorithm property:
a)
Effectiveness.
b)
Search.
c)
Sorting.
d)
Linear.
e)
Sequential.
35.
Types of algorithms:
a)
Linear algorithm.
b)
Non-search algorithm.
c)
Predictive algorithm.
d)
Aggregate.
e)
Discrete.
36.
Rule for determining complexity:
a)
O(k*f)=O(f).
b)
O(f*g)=O(f)*O(а*g).
c)
O(f+g)=O(f)+O(g+f).
d)
O(k*f)<>O(f).
e)
O(f*g)<>O(f)*O(g).
37.
It is required to determine the complexity of the algorithm:
a)
O(1) –Any algorithm has constant complexity that does not depend on the size of the data and executes in a fixed amount of time.
b)
O(N) – The program’s execution time is linear, and it may not handle a linear number of operations efficiently.
c)
O(N*N) – Not quadratic complexity.
d)
O(N) – Any algorithm depends on the size of the data and executes in linear time.
e)
O(N*N) – The program usually executes linearly, and each input element is processed only once.
38.
a)
The loop body executes 1 time.
b)
The loop executes 1000 times.
c)
The loop executes 2 times.
d)
The loop executes 101000 times.
e)
The loop executes 1000000 times.
39.
Find the correct statement:
a)
A precondition loop executes longer than a postcondition loop.
b)
During the execution of a counter-controlled and postcondition loop, not all situations match the condition.
c)
The execution time of the loop is not distinguishable.
d)
When using a nested loop, the execution of such a construct is not checked.
e)
A precondition loop does not execute faster than a postcondition loop.
40.
How is the time complexity of an algorithm evaluated (to be continued…):
a)
O(1).
b)
O(n/5).
c)
O(n*n/5).
d)
O.
e)
N!.
41.
a)
O(2*N).
b)
O(F(N/2)), F(N)=2*N.
c)
O(C*N+6).
d)
O(N+N*N).
e)
N/2.
42.
a)
O(N*N).
b)
O(N*2+6).
c)
O(N+N*N).
d)
N/2.
e)
Quadratic.
43.
An example of a recursive definition of a function:
a)
F(0)=0, f(n)= f(n-1)+1.
b)
F(n)=1/n.
c)
F(0)=1, f(1)=1, f(n)= f(n-1)+ f(n-2+6), n>=2.
d)
F(n)=n.
e)
F(n)=n*n.
44.
Fibonacci sequence:
a)
1, 1, 2.
b)
1, 1, 2, 3, 2, 3.
c)
1, 1, 2, 3, 5, 8, 13.
d)
1, 1, 2, 3, 8, 13,23.
e)
1, 2, 3, 4, 5, 6.
45.
Indicate the form of a recursive program:
a)
Performing a recursive action.
b)
Cartesian.
c)
Not performing the action after the recursive call.
d)
Function.
e)
Procedure.
46.
Form of a recursive program:
a)
Performing a recursive action.
b)
Cartesian.
c)
Not performing the action after the recursive call.
d)
Function.
e)
Procedure.
47.
Basic principles of a type:
a)
Any data type defines a set of values, which can be a variable or an expression.
b)
Only the string type consists of a set of data.
c)
Each operation or function does not necessarily return a result of the defined type.
d)
A data type does not consist of a set of values.
e)
Some units of types can be constant, variable, or expression.
48.
Indicate the correct form of the output operator:
a)
write (x, y; 2)
b)
print (x, x+1, x+2)
c)
print (x; y; z);
d)
read (x, y);.
e)
readln (x, z);.
49.
Standard arithmetic operations:
a)
+.
b)
***.
c)
**.
d)
=.
e)
==.
50.
A data type defines:
a)
The format of data representation in memory.
b)
Sets.
c)
Operations that are not allowed on the values.
d)
Compilation mode.
e)
Number system.
51.
Standard data types:
a)
Int
b)
Set
c)
Boolean, integer
d)
Array, set
e)
Record
52.
Indicate the modules included in the standard Python library:
a)
math
b)
trmath
c)
numpy
d)
PIL
e)
import
53.
X=byte(input()) a structure that is not allowed in the type assignment operator:
a)
X=256
b)
X=0
c)
X=200
d)
X=255
e)
X=100
54.
X=int(input()) assignment operator:
a)
X= 32768
b)
X=0
c)
X=200
d)
X=255
e)
X=100
55.
An element that is the result of aggregation [1. . 3, 5. . 8] - [1. . 2, 6. . 9]:
a)
3.
b)
50.
c)
1.
d)
2.
e)
6.
56.
The resulting set [1. . 8] * [2..4] consists of the following elements:
a)
2.
b)
40.
c)
5.
d)
6.
e)
7.
57.
Correct identifiers:
a)
ABC
b)
3_mum
c)
41And
d)
A+B
e)
_mam
58.
Types of pointers:
a)
Typed pointer.
b)
Not applicable to some object types.
c)
Deleted pointer.
d)
Character pointer.
e)
Boolean pointer.
59.
a)
25
b)
25000
c)
1000
d)
25 25000
e)
25 2500
60.
Correctly defined variables:
a)
a=5
b)
a=(5)
c)
int a=5
d)
a - 5
e)
a=5;
61.
Stack - :
a)
A data structure that works with elements organized according to the LIFO principle.
b)
A data structure that works according to the FIFO (first in, first out) principle.
c)
Number.
d)
A linear list where only the first element is accessible.
e)
A linked linear list that removes the last two elements.
62.
Queue - :
a)
A linear list where only the first element is accessible.
b)
A data structure that works with elements organized according to the LIFO principle.
c)
A data structure that works according to the FIFO (first in, first out) principle.
d)
Deque.
e)
A linked linear list that removes the last two elements.
63.
Deque - :
a)
A data structure that works according to the FIFO (first in, first out) principle.
b)
A data structure that works with elements organized according to the LIFO principle.
c)
Number.
d)
A linear list where only the first element is accessible.
e)
A linear list with access to the last element.
64.
Features of a circular list:
a)
When an element is deleted from a circular list, the list decreases by one element.
b)
When an element is deleted from a circular list, the list splits.
c)
When an element is deleted from a circular list, a gap appears in the list.
d)
The pointer in a circular list is used to reference the next element.
e)
The pointer in a circular list describes an element while storing the segment number.
65.
Tree element:
a)
Root.
b)
Graph.
c)
Key.
d)
Gun.
e)
Board.
66.
Types of graphs:
a)
Directed.
b)
Undirected.
c)
Linear.
d)
Discrete.
e)
Analog.
67.
Sorting methods are classified into:
a)
Array sorting and file sorting.
b)
Array sorting and sequential non-sorting.
c)
Indirect and direct.
d)
Adjacent.
e)
Linear and cubic.
68.
External sorting methods:
a)
Selection sort.
b)
Non-merging sort.
c)
Direct sort.
d)
Exact sort.
e)
Multi-phase sort.
69.
Efficient principle of an external sorting algorithm:
a)
Number of key comparisons.
b)
Number of comparisons with data type and key values.
c)
Data type.
d)
Number of array elements.
e)
Number of keys.
70.
An array consisting of N elements is sorted by the direct insertion method. Cmin needs to be determined:
a)
N=100, Сmin=99.
b)
Depends on the initial order of the array.
c)
N=10, Сmin=44.
d)
Сmin=n+1.
e)
Сmin=(n*n-n)/2-1.
71.
An array consisting of N elements is sorted by the direct insertion method. СmaX needs to be determined:
a)
N=4, Сmax=4.
b)
Depends on the initial order of the array.
c)
N=4, Сmax =5.
d)
Сmax =n-1.
e)
N=1000, Сmax =1000.
72.
An array of N elements is sorted by the direct insertion method. Mmin needs to be determined:
a)
Mmin=3(N-1).
b)
Mmin=2*N-2.
c)
Depends on the initial order of the array.
d)
Mmin=2N.
e)
Mmin=2(N+1).
73.
An array of N elements is sorted by the direct insertion method.MmaX needs to be determined:
a)
Mmax=(N*n+3*n-4)/2.
b)
Mmax=2*N-2.
c)
Depends on the initial order of the array.
d)
Mmax=2N.
e)
N=2, Mmax=3.
74.
a)
L=2 a[2]=06.
b)
L=2 a[1]=55.
c)
L=3 a[1]=12.
d)
L=4 a[1]=42.
e)
L=2 a[1]=94.
75.
a)
L=1 a[1]=44 a[2]=55.
b)
L=1 a[1]=55 a[2]=44.
c)
L=2 a[1]=44 a[2]=12.
d)
L=3 a[1]=06 a[2]=44.
e)
L=2 a[1]=06 a[2]=12.
76.
a)
L=2 a[1]=55.
b)
L=3 a[1]=44.
c)
L=4 a[1]=42.
d)
L=2 a[1]=18.
e)
L=2 a[1]=44.
77.
a)
L=2 a[1]=12.
b)
L=3 a[1]=42.
c)
L=2 a[1]=55.
d)
L=3 a[1]=67.
e)
L=1 a[1]=44.
78.
a)
L=2 a[2]=55.
b)
L=2 a[1]=12.
c)
L=3 a[1]=12.
d)
L=4 a[1]=42.
e)
L=2 a[1]=18.
79.
Indicate the external sorting method:
a)
Direct partition.
b)
Selection sort.
c)
Sorting using a tree (Heapsort).
d)
Sorting by partitioning.
e)
Direct partition and selection sort.
80.
a)
Here x= 10, k=6.
b)
Here x= 10, k=1.
c)
Here x= 10, k=4.
d)
Here x= 0, k=7.
e)
Here x= 0, k=-1.
81.
a)
Here x= 10, i=1.
b)
Here x= 10, i=4.
c)
Here x= 10, i=6.
d)
Here x= 7, i=7.
e)
Here x= 7, i=0.
82.
Based on the comparison result, search either the left or right half of the array. Compare X with the element located in the middle of the array and, based on the result, continue the search:
a)
b)
Binary sort.
c)
Linear search.
d)
Search with a sentinel element.
e)
Search for a barrier element.
83.
String search algorithms:
a)
Knuth, Morris and Pratt algorithm.
b)
Euclidean algorithm.
c)
Shell algorithm.
d)
Bubble algorithm.
e)
Insertion algorithm.
84.
Using a module:
a)
Advantage: the ability to apply ready-made libraries to frequently used modules.
b)
Advantage: the transfer operator can be controlled from anywhere in the program (goto).
c)
Disadvantage: no possibility to use ready-made libraries for frequently used modules.
d)
Disadvantage: complexity in design and further program operation.
e)
Disadvantage: complexity of program execution.
85.
Advantages of structured programming:
a)
Increases program reliability.
b)
The transfer operator can be used anywhere in the program (goto).
c)
Program reliability decreases.
d)
Time decreases, but the cost of the software product increases.
e)
Time increases, but the cost of the software product decreases.
86.
Principles of structured programming technology:
a)
Programming is carried out from bottom to top and top to bottom.
b)
The transfer operator can be used anywhere in the program (goto).
c)
Only the main structure — sequential execution — is used in the program body.
d)
Only the main structure — branching (if, case) operator — is used in the program body.
e)
Only the main structure — repetition (for, while, repeat) — is used in the program body.
87.
Problems unsolvable due to the absence of a general method:
a)
Distribution of the digit nine in the decimal expansion of π.
b)
Post machine in the last marked box.
c)
The “halting” problem.
d)
Algorithm equivalence problem.
e)
Modification problem.
88.
Problems that cannot be solved logically due to the absence of a general method:
a)
The “halting” problem.
b)
Distribution of the digit nine in the decimal expansion of π.
c)
Numerical calculation.
d)
Hilbert’s tenth problem.
e)
Post machine in the last marked box.
89.
Problems that cannot be solved algorithmically due to the absence of a general method:
a)
Distribution of the digit nine in the decimal expansion of π.
b)
Post machine in the last marked box.
c)
The “halting” problem.
d)
Algorithm equivalence problem.
e)
Modification problem.
90.
Classification of algorithms by execution scale:
a)
Numerically dependent according to algorithm complexity.
b)
Numerically independent according to algorithm complexity.
c)
Parameter-dependent or independent according to algorithm complexity.
d)
Efficient algorithms.
e)
Complex algorithms.
91.
Addition operation (integer arithmetic) …:
a)
Real.
b)
Real и ShortInt.
c)
String.
d)
Char.
e)
Byte.
92.
”White-box” strategic method:
a)
Operator coverage method.
b)
Condition fulfillment method.
c)
Control-flow diagram method.
d)
Error detection and testing method.
e)
Golden section method.
93.
"Black-box" strategic method:
a)
Condition method.
b)
Operator coverage.
c)
Decision coverage.
d)
Condition coverage.
e)
Operator and decision coverage.
94.
Errors at runtime:
a)
Structural errors.
b)
Types of errors.
c)
Syntax errors.
d)
Semantic errors.
e)
Pragmatic errors.
95.
Classification of software errors affecting logic:
a)
Syntax errors.
b)
Semantic errors.
c)
Structural errors.
d)
Compilation errors.
e)
Runtime errors.
96.
Syntax error:
a)
Mismatched parentheses.
b)
Semantic.
c)
Division by zero.
d)
Error of this type is not detected by the compiler.
e)
Exceeding memory capacity.
97.
Data reference error:
a)
Error occurring during arithmetic operations.
b)
Data of different type.
c)
Division by zero.
d)
Error occurring when the program attempts to access data.
e)
Exceeding memory capacity.
98.
Computation error –:
a)
Error occurring during arithmetic operations.
b)
Error occurring when the program attempts to access data.
c)
Error when an array index goes out of bounds.
d)
Undefined variable value.
e)
Exceeding memory capacity.
99.
Böhm-Jacopini theorem:
a)
The logical structure of a program consists of a combination of three basic structures.
b)
The logical structure of a program consists of precondition and postcondition loops.
c)
The logical structure of a program can consist of four basic combinations.
d)
The logical structure of a program does not consist of basic search, branching, and loop operators.
e)
The logical structure of the program consists of a condition.
100.
Causes leading to algorithmic incompleteness:
a)
Absence of a general method for solving the problem.
b)
Excess information.
c)
Compilation error.
d)
Error in the method.
e)
Incorrect application of the method.