Analysis of task 6 on OGE computer science

Analysis and construction of algorithms for performers

Squaring and division operations

№1. The performer KVADRATOR has only two teams, which are assigned numbers:

1. square

2. add 1

By executing command number 1, QUADRATOR squares the number on the screen, and by executing

command number 2, adds 1 to this number. Write a program containing not

more than 4 teams, which from number 1 gets number 17. Indicate only the team numbers.

For example, program 12122 is a program:

square it

add 1

square it

add 1

add 1

which converts the number 1 to the number 6.

Explanation.

Not every number is a square of an integer, so if we go from the number 17 to the number 1, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 17 is not a square, which means it is obtained by adding one to the number 16: 17 = 16 + 1 (command 2).

Let's repeat the reasoning for the number 25: 25 = 27 - 2 (team 2).

2) Since we want to get no more than 4 teams, to get the number 16 we square 4: 16 = 4 2 (team 1).

Let's repeat reasoning 2) for the number 4: 4 = 2 2 (command 1), and for the number 2 we apply reasoning 1): 2 = 1 + 1 (command 2).

Then we finally get the answer: 2112.

№2.

1. add 1,

2. square it.

square it

square it

add 1

add 1

add 1

number 5 to number 2500

Explanation.

Not every number is the square of an integer, so if we go from the number 2500 to the number 5, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 2500 is the square of the number 50, therefore, it was obtained using operation 2.

2) The number 50 is not a square, which means it was obtained using operation 1. Subtract 1 from it and get the number 49.

3) The number 49 is the square of 7, which means it was obtained by operation 2.

4) Subtract one from 7 twice and get the original number 5. We have just applied the inverse operation of 1 twice.

Then we finally get the answer: 11212.

№3. The performer Quad has two teams, which are assigned numbers:

1. add 1,

2. square it.

The first of these commands increases the number on the screen by 1, the second - squares it. The program for the Quad performer is a sequence of command numbers.

For example, 22111 is a program

square it

square it

add 1

add 1

add 1

This program converts the number 3 to the number 84.

Write a program for the Quad performer that converts number 3 to number 10001 and contains no more than 6 commands. If there is more than one such program, then write down any of them.

Explanation.

Not every number is the square of an integer, so if we go from the number 10001 to the number 3, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 10001 is not a square, therefore it was obtained using the operation 1 from the number 10000.

2) The number 10000 is the square of 100, which means it was obtained using operation 2.

3) The number 100 is the square of 10, which means it was obtained by operation 2.

4) The number 10 is not a square, therefore, it was obtained using the operation 1 from the number 9.

5) The number 9 is the square of the number 3, therefore, it was obtained using operation 2. The number 3 is the original number.

Then we finally get the answer: 21221.

№4.

1. add 1,

2. square it.

The first of these commands increases the number on the screen by 1, the second - squares it. The program for the performer Quadrator is a sequence of command numbers.

For example, 21211 is a program

square it

add 1

square it

add 1

add 1

This program converts the number 2 to the number 27.

Write a program that converts the number 2 to the number 102 and contains no more than 6 commands. If there is more than one such program, then write down any of them.

Explanation.

Not every number is the square of an integer, so if we go from the number 102 to the number 2, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 102 is not a square, which means it is obtained by adding two units to the number 100: 102 = 100 + 2 (command 1 twice).

2) Since we want to get no more than 6 teams, to get the number 100 we square 10: 100 = 10 2 (team 2).

Let's repeat reasoning 1) for the number 10: 10 = 9 + 1 (team 1), and for the number 9 we apply reasoning 2): 9 = 3 2 (team 2). Then we repeat reasoning 1) again for the number 3: 3 = 2 + 1 (command 1).

Then the answer is: 121211.

№5. The performer Kvadrator has two teams, which are assigned numbers:

1. add 2,

2. square it.

The first of these commands increases the number on the screen by 2, and the second one squares it. The Quadrvtor executor's program is a sequence of command numbers. For example, 12211 is a program

add 2

square it

square it

add 2

add 2

This program converts, for example, the number 1 to the number 85.

Write a program that converts the number 1 to 123 and contains no more than 5 commands. If there is more than one such program, write down any of them.

Explanation.

Not every number is the square of an integer, so if we go from the number 123 to the number 1, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 123 is not a square, which means it is obtained by adding two to the number 121: 123 = 121 + 2 (command 1).

2) The number 121 is the square of the number 11: 121 = 11·11 (team 2).

3) The number 11 is not a square, so it is obtained by adding two to the number 9: 11 = 9 + 2 (command 1).

4) The number 9 is the square of the number 3: 9 = 3·3 (team 2).

5) The number 3 is not a square, that is, it is obtained by adding 2 to 1: 3 = 1 + 2 (command 1).

The required sequence of commands: 12121.

№6.

1. subtract 2

2. divide by 5

Write down the order of commands in a program that contains no more than 5 commands and converts the number 152 to the number 2.

Yes, for the program

divide by 5

subtract 2

subtract 2

you need to write 211. This program converts, for example, the number 55 to the number 7.

Explanation.

Multiplication by a number is not reversible for any number, so if we go from the number 55 to the number 7, then we will definitely restore the program.

1) 152 − 2 = 150 (command 1),

2) 150 / 5 = 30 (team 2),

3) 30 / 5 = 6 (team 2),

4) 6 − 2 = 4 (team 1),

5) 4 − 2 = 2 (command 1).

Let's write down the order of the commands and get the answer: 12211.

№7. The performer Kvadrator has two teams, which are assigned numbers:

1. square it,

2. add 1.

The first of them squares the number on the screen, the second increases it by 1. Write down the order of commands in a program that converts the number 1 to the number 17 and contains no more than 4 commands. Enter only command numbers. (For example, the program 2122 - this is a program

add 1,

square it

add 1,

add 1.

Explanation.

1) The root of the number 17 is not an integer, which means it is obtained by adding one to the number 16: 17 = 16 + 1 (command 2).

2) Since we want to receive no more than 4 commands, to obtain the number 16 it is advantageous to use squaring: 16 = 4 2 (command 1).

Let us repeat the second reasoning for the number 4. For the number 2 we repeat the first reasoning.

Then we finally get the answer: 2112.

№8. Performer TwoFive has two teams, which are assigned numbers:

1. subtract 2

2. divide by 5

By performing the first of them, TwoFive subtracts 2 from the number on the screen, and by performing the second, it divides this number by 5 (if division is completely impossible, TwoFive is turned off).

Write down the order of commands in a program that contains no more than 5 commands and converts the number 177 to the number 1.

divide by 5

subtract 2

subtract 2

you need to write 211. This program converts, for example, the number 100 to the number 16.

Explanation.

Multiplication by a number is not reversible for any number, therefore, if we go from the number 177 to the number 1, then we will definitely restore the program.

If the number is not a multiple of 5, then subtract 2, and if it is, then divide by 5.

1) 177 − 2 = 175 (team 1),

2) 175 / 5 = 35 (team 2),

3) 35 / 5 = 7 (team 2),

4) 7 − 2 = 5 (team 1),

5) 5 / 5 = 1 (team 2).

Let's write down the order of the commands and get the answer: 12212.

№9. The performer Kvadrator has two teams, which are assigned numbers:

1. square it,

2. add 1.

The first of them squares the number on the screen, the second increases it by 1. Write down the order of commands in a program that converts the number 2 into the number 36 and contains no more than 4 commands. Enter only command numbers. (For example, the program 2122 - this is a program

add 1

square it

add 1

add 1.

This program converts the number 1 to the number 6.

Explanation.

Raising to a power is not reversible for any number, so if we go from the number 36 to the number 2, then we will definitely restore the program. Received commands will be written from right to left.

1) Since we want to receive no more than 4 commands, to obtain the number 36 it is advantageous to use squaring: 36 = 6 2 (command 1).

2) The root of the number 6 is not an integer, which means it is obtained by adding one to the number 5: 6 = 5 + 1 (command 2).

Let us repeat the second reasoning for the number 5. For the number 4 we repeat the first reasoning.

Then we finally get the answer: 1221.

№10. The performer Kvadrator has two teams, which are assigned numbers:

1. square it,

2. add 1.

The first of them squares a number on the screen, the second increases it by 1. Write down the order of commands in a program that converts the number 1 into the number 25 and contains no more than 4 commands. Enter only command numbers.

(For example, the program 2122 - this is a program

add 1

square it

add 1

add 1.

This program converts the number 1 to the number 6.)

Explanation.

Raising to a power is not reversible for any number, so if we go from the number 10 to the number 1, then we will definitely restore the program. Received commands will be written from right to left.

1) Since we want to receive no more than 4 commands, to obtain the number 25 it is advantageous to use squaring: 25 = 5 2 (command 1).

2) The root of the number 5 is not an integer, which means it is obtained by adding one to the number 4: 5 = 4 + 1 (command 2).

Let us repeat the first reasoning for the number 4. For the number 2 we repeat the second reasoning.

Then we finally get the answer: 2121.

Checking the letter sequence for compliance with the algorithm

№1. From the letters O, S, L, L, M, 3, A, I a word is formed. It is known that the word is formed according to the following rules:

a) the vowels in the word are not next to each other;

b) the first letter of the word is not a vowel and in the Russian alphabet comes before the letter “P”.

Explanation.

Answers 1), 2) and 3), do not satisfy condition b): in the words OASIS and OSLO the first letter of the word is a vowel, and the word SALT begins with the letter “S”, which comes after the letter “P” in the Russian alphabet.

№2. From the letters A, I, 3, U, T, M, K, S a word is formed. It is known that the word is formed according to the following rules:

a) the word does not contain two vowels or two consonants in a row;

b) the first letter of a word in the Russian alphabet comes before the letter “K”.

1) AZIMUT

Explanation.

Answers 2) and 3), do not satisfy condition b): because the letters “T” and “M” come after “K” in the Russian alphabet.

Option 4) contains two consecutive consonants.

The correct answer is listed under number 1.

№3. A word is formed from the letters of the Russian alphabet. It is known that the word is formed according to the following rules:

a) there are no repeating letters in the word;

b) all letters of the word are in direct or reverse alphabetical order, possibly excluding the first.

Which of the following words satisfies all of the conditions listed?

Explanation.

Consider the order of letters in words, not taking into account the first letter.

IRA: R-A - reverse order.

OLGA: the letters L and L are in direct alphabetical order, however, the combination of L and G is already in reverse order.

SONYA: O-N - reverse order, N-Z - forward order.

ZINA: I-N - direct order, N-A - reverse order.

Options 2), 3) and 4) do not satisfy condition b).

№4. To make chains, beads are used, marked with the letters A, B, C, D, E. One of the beads A, B, D closes the chain. At the beginning - any vowel if the third letter is a consonant, and any consonant if the third letter is a vowel. In second place is one of the beads A, B, C, which is not in first place in the chain.

Explanation.

1 - not suitable, because ends with the letter C

2 - not suitable, because ends and begins with a consonant

3 - not suitable, because ends and begins with a vowel

4 - suitable

№5. Pasha forgot the password to start the computer, but remembered the algorithm for obtaining it from the characters “KBRA69KBK” in the hint line. If all the character sequences “RA6” are replaced with “FL”, “KB” with “12V”, and the last 3 characters are removed from the resulting string, then the resulting sequence will be the password:

Explanation.

We perform all the steps sequentially:

KBRA69KBK => KBFL9KBK => 12BFL912BK => 12BFL91

№6. A chain of three beads marked with Latin letters is formed according to the following rule. At the end of the chain there is one of the W, X, Y, Z beads. In the middle is one of the V, W, Z beads, which is not in the last place. In first place is one of the beads X, Y, Z, not in second place.

Which of the following chains was created according to this rule?

Explanation.

Let's check all the answers one by one:

1 - not suitable, because in the middle there is a letter Z at the end

2 - not suitable, because there's an X in the middle that shouldn't be there

3 - not suitable, because there's a V at the end that shouldn't be there

4 - suitable

№7. A chain of three beads marked with Latin letters is formed according to the following rule. At the beginning of the chain there is one of the beads A, B, E. In second place is one of the beads B, D, E, which is not in third place. In third place is one of the beads A, B, C, D that is not in first place.

Which of the following chains was created according to this rule?

Explanation.

Let's check all the answers one by one:

1 - not suitable because it ends with the letter E

2 - does not fit, because there is an A in the middle

3 - suitable

4 - does not fit, because the letter A is in the first and third place.

№8. Sonya forgot the password to start the computer, but remembered the algorithm for obtaining it from the characters “KVMAM9KVK” in the hint line. If all sequences of characters “MAM” are replaced with “RP”, “KVK” with “1212”, and the last 3 characters are removed from the resulting string, then the resulting sequence will be the password:

Explanation.

From KVMAM9KVK we get KVRP9KVK.

From КВRP9КВК we get КВRP91212.

From KBRP91212 we get KBRP91.

№9. Lyuba forgot the password to start the computer, but remembered the algorithm for obtaining it from the characters “QWER3QWER1” in the hint line. If all sequences of “QWER” characters are replaced with “QQ”, and the combinations of “3Q” characters are removed from the resulting string, then the resulting sequence will be the password:

Explanation.

Let's perform all the steps sequentially:

From QWER3QWER1 we get QQ3QQ1.

FROM QQ3QQ1 we obtain QQQ1.

№10. In forming a chain of four beads, some rules are used: At the end of the chain there is one of the beads P, N, T, O. On the first place there is one of the beads P, R, T, O, which is not in the third place. In third place is one of the O, P, T beads that is not the last one in the chain. Which of the following chains could be created taking into account these rules?

Explanation.

In option 1) the third letter is R, which violates the condition “in third place is one of the beads O, P, T”

In option 2), the letter T in third place coincides with the letter in first place, which also does not satisfy the condition.

In option 3) the third and last letters are the same, which does not satisfy the condition.

Correct option 4).

The correct answer is listed at number 4.

Non-standard performers

№1. The performer GRASSHOPPER lives on the number line. The initial position of the GRASSHOPPER is point 0. The Grasshopper command system:

Forward 5 – The grasshopper jumps forward 5 units,

Back 3 – The grasshopper jumps back 3 units.

What is the least number of times the command “Back 3” must appear in the program for the Grasshopper to end up at point 21?

Explanation.

Let us denote by the number of “Forward 5” commands in the program, and by the number of “Back 3” commands, and there can only be non-negative integers numbers.

In order for the GRASSHOPPER to get to point 21 from point 0, the following condition must be met:

Let's imagine it in the form:

From the last equation we can see that the right side must be divisible by 5.

Of all the solutions, we are interested in the one for which is the smallest possible number.

Using the selection method we find: .

№2.

2. The resulting two numbers are written one after another in descending order (without separators).

Example. Original number: 348. Sums: 3 + 4 = 7; 4 + 8 = 12. Result: 127. Specify the smallest number, as a result of which the machine will produce the number 1412.

Explanation.

Let 12 = 3 + 9, then it is advantageous to divide 14 into the sum of the numbers 9 and 5. The smallest initial number that satisfies the conditions of the problem: 395.

Answer: 395.

№3. The machine receives a four-digit number as input. Based on this number, a new number is constructed according to the following rules:

1. The first and second, as well as the third and fourth digits of the original number are added.

Example. Original number: 2366. Sums: 2 + 3 = 5; 6 + 6 = 12. Result: 512. Specify the largest number, as a result of which the machine will produce the number 117.

Explanation.

Since the numbers are written in ascending order, one sum of the digits of two digits is 1, the other is 17. For the number to be the largest, it is necessary that the highest digits contain the largest possible digit, therefore the sum of the highest digits must be larger. When decomposing 17 into terms, it is necessary that one of them be the maximum possible, so let's imagine 17 as the sum of 9 and 8, these are the first two digits of the desired number. The second two digits are obtained by decomposing the number 1 into its terms: 1 and 0. Therefore, the answer is 9810.

Answer: 9810.

No. 4. The Doubler performer has two teams, which are assigned numbers:

1. add 1,

2. multiply by 2.

The first of them increases the number on the screen by 1, the second doubles it. For example, 2122 is a program

multiply by 2

add 1

multiply by 2

multiply by 2,

which converts the number 1 to the number 12.

Write down the order of commands in a program for converting the number 4 to the number 57, containing no more than 7 commands, indicating only the command numbers. If there is more than one such program, then write down any of them.

Explanation.

Multiplication by a number is not reversible for any number, therefore, if we go from the number 57 to the number 4, we will definitely restore the program. Received commands will be written from right to left. If the number is not a multiple of 2, then subtract 1, and if it is a multiple, then divide by 2:

57 − 1 = 56 (team 1);

56/2 = 28 (team 2);

28 / 2 = 14 (team 2);

14 / 2 = 7 (team 2);

7 − 1 = 6 (team 1);

6 − 1 = 5 (team 1);

5 − 1 =4 (team 1).

Let's write the sequence of commands in reverse order and get the answer: 1112221.

№5. Artist The Draftsman has a pen that can be raised, lowered, and moved. When you move a lowered pen, it leaves a trace behind it in the form of a straight line. The performer has the following commands:

Move by vector (a, b) – the performer moves to a point that can be reached from this one by moving a units horizontally and b units vertically.

The entry: Repeat 5[Command 1 Command 2] means that the sequence of commands in square brackets is repeated 5 times.

The draftsman is at the origin. The draftsman is given the following algorithm to execute:

Shift by vector (5,2)

Move by vector (-3, 3)

Repeat 3[Shift by vector (1,0)]

Move by vector (3, 1)

At what distance from the origin will the Draftsman be located as a result of executing this algorithm?

Explanation.

The end point will have axis coordinates x And y. These coordinates can be added independently of each other.

Let's find the value x: 5 - 3 + 1 + 1 + 1 + 3 = 8.

Let's find the value y: 2 + 3 + 1 = 6.

The distance from the origin of coordinates is found by the formula: , therefore

.

converts the number 1 to 12.

Write down the order of commands in a program for converting the number 4 to the number 57, containing no more than 7 commands, indicating only the command numbers. If there is more than one such program, then write down any of them.

Explanation.

Multiplication by a number is not reversible for any number, therefore, if we go from the number 57 to the number 4, we will definitely restore the program. Received commands will be written from right to left. If the number is not a multiple of 2, then subtract 1, and if it is a multiple, then divide by 2:

57 − 1 = 56 (team 1);

56/2 = 28 (team 2);

28 / 2 = 14 (team 2);

14 / 2 = 7 (team 2);

7 − 1 = 6 (team 1);

6 − 1 = 5 (team 1);

5 − 1 =4 (team 1).

Let's write the sequence of commands in reverse order and get the answer: 1112221.

№6. Executor The calculator works with positive single-byte integer numbers. It can execute two commands:

1. shift the bits of the number to the left one position

2. add 1

For example, the number 7 (00000111 2) is converted by command 1 to 14 (00001110 2). For the given number 14, the command sequence 11222 was executed. Write the result in the decimal number system.

Explanation.

If there is no one in the most significant digit, then command 1 doubles the number, therefore we get the following:

№7. There is a performer called Grasshopper, who lives on the number line. Grasshopper command system:

Forward N – Grasshopper jumps forward N units

Backward M – Grasshopper jumps back M units

The variables N and M can take any positive integer values. The grasshopper executed a program of 20 commands, in which there are 4 fewer “Back 4” commands than “Forward 3” commands (there are no other commands in the program). What one command can this program be replaced with?

Explanation.

Let us denote by the number of “Forward 3” commands in the program, and by - the number of “Back 4” commands, andmaybe justnon-negative integer number.

Total grasshopper made commands We'll find it from here. Let's calculate where the Grasshopper will end up after executing the indicated commands:

You can get to this point from the original point by executing the command “Forward 4”.

Answer: Forward 4.

№8. There are two windows on the screen, each of which contains a number. The ADDER executor has only two commands, which are assigned numbers:

By executing command number 1, the SUMMER adds the numbers in two windows and writes the result to the first window, and by executing command number 2, it replaces the number in the second window with this sum. Write a program containing no more than 5 commands, which from a pair of numbers 1 and 2 gets a pair of numbers 13 and 4. Specify only the command numbers.

For example, program 21211 is a program:

Write the sum of numbers in the second window

Write the sum of the numbers in the first window

Write the sum of numbers in the second window

Write the sum of the numbers in the first window

Write the sum of the numbers in the first window

which converts the pair of numbers 1 and 0 into the pair of numbers 8 and 3.

Explanation.

It will be more convenient to go from end to beginning.

Both teams keep one number unchanged, which means that the pair 13 and 4 also contains the number from the previous pair. Since 13 > 4, then 4 has not changed, which means 13 = 9 + 4. This pair is obtained team 1 from a pair of 9 and 4.

Likewise for 9: 9 = 5 + 4, team 1 from a pair of 5 and 4.

Similarly for 5: 5 = 1 + 4, team 1 from pair 1 and 4.

Since 1< 4, то число 4 по­лу­че­но как 4 = 1 + 3, т. е. team 2 from pair 1 and 3

We reason similarly for 3: 3 = 1 + 2, team 2 from pair 1 and 2.

Finally, the command sequence is: 22111.

№9.

Explanation.

If the robot goes back the same way it came to the final cell, then it will definitely not be destroyed. The 1324 command group is circular, so it can be folded back. The robot traveled along the path 132 to the final cell. This means that to get back, it needs to replace the commands with the opposite ones (241) and write them from right to left: 142.

Answer: 142.

№10. Performer Robot operates on a checkered board, between adjacent cells of which there may be walls. The robot moves along the squares of the board and can execute commands 1 (up), 2 (down), 3 (right) and 4 (left), moving to an adjacent cell in the direction indicated in brackets. If there is a wall in this direction between the cells, then the Robot is destroyed. The robot successfully completed the program

What sequence of three commands must the Robot execute in order to return to the cell where it was before the start of the program and not collapse, regardless of what walls are on the field?

Explanation.

If the robot goes back the same way it came to the final cell, then it will definitely not be destroyed. The command group 3241 is circular, so it can be folded back. The robot traveled along the path 242 to the final cell. This means that to get back, it needs to replace the commands with the opposite ones (131) and write them from right to left: 131.

Answer: 131.

processing of garbled messages

№1.

Original message

1101001 0011000 0011101

was adopted as

1101001 0001001 0011100.

1) 0000000 0001001 0011100

2) 1101001 0000000 0011100

3) 1101001 0000000 0000000

4) 1101001 0001001 0000000

Explanation.

№2. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

1100101 1001011 0011000

was adopted as

1100111 1001110 0011000.

What will the received message look like after processing?

1) 1100111 1001011 0011000

2) 1100111 1001110 0000000

3) 0000000 0000000 0011000

4) 0000000 1001110 0011000

Explanation.

Let's process each word of the received message. The first word: 1100111, the sum of its digits is 5 - odd, the word is automatically replaced by the word 0000000. The second word: 1001110, the sum of its digits is 4 - even, the word does not change. The third word: 0011000, the sum of its digits of 2 is even, the word does not change.

So the answer is: 0000000 1001110 0011000.

№3. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

0100100 0001001 0011000

was adopted as

0100110 0001100 0011000.

What will the received message look like after processing?

1) 0100110 0000000 0011000

2) 0000000 0001100 0011000

3) 0000000 0000000 0011000

4) 0100110 0001100 0000000

Explanation.

Let's process each word of the received message. The first word: 0100110, the sum of its digits is 3 - odd, the word is automatically replaced by the word 0000000. The second word: 0001100, the sum of its digits is 2 - even, the word does not change. The third word: 0011000, the sum of its digits of 2 is even, the word does not change.

So the answer is: 0000000 0001100 0011000.

№4. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

0011110 0011011 0011011

was adopted as

0011110 0011000 0011001.

What will the received message look like after processing?

1) 0011110 0011000 0000000

2) 0011101 0000000 0000000

3) 0011110 0000000 0011001

4) 0000000 0011000 0011001

Explanation.

Let's process each word of the received message. The first word: 0011110, the sum of its 4 digits is even, the word does not change. The second word: 0011000, the sum of its digits of 2 is even, the word does not change. The third word: 0011001, the sum of its digits is 3 - odd, the word is automatically replaced by the word 0000000.

So the answer is: 0011110 0011000 0000000.

№5. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

1101001 0011000 0011101

was adopted as

1101001 0001001 0011100.

What will the received message look like after processing?

1) 0000000 0001001 0011100

2) 1101001 0000000 0011100

3) 1101001 0000000 0000000

4) 1101001 0001001 0000000

Explanation.

Let's process each word of the received message. The first word: 1101001, the sum of its 4 digits is even, the word does not change. The second word: 0001001, the sum of its digits of 2 is even, the word does not change. The third word: 0011100, the sum of its digits is 3 - odd, the word is automatically replaced by the word 0000000.

So the answer is: 1101001 0001001 0000000.

№6. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

1111101 0011011 1011100

was adopted as

1111101 0011111 1000100.

What will the received message look like after processing?

1) 0000000 0011111 1000100

2) 1111101 0000000 0000000

3) 1111101 0000000 1000100

4) 1111101 0011111 0000000

Explanation.

Let's process each word of the received message. The first word: 1111101, the sum of its digits of 6 is even, the word does not change. The second word: 0011111, the sum of its digits is 5 - odd, the word is automatically replaced by the word 0000000. The third word: 1000100, the sum of its digits is 2 - even, the word does not change.

So the answer is: 1111101 0000000 1000100.

№7. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

0010100 0101000 1010101

was adopted as

0010100 0110011 1000101.

What will the received message look like after processing?

1) 0010100 0000000 0000000

2) 0010100 0000000 1000101

3) 0000000 0101000 1010101

4) 0010100 0110011 0000000

Explanation.

Let's process each word of the received message. The first word: 0010100, the sum of its digits of 2 is even, the word does not change. The second word: 0110011, the sum of its 4 digits is even, the word does not change. The third word: 1000101, the sum of its digits is 3 - odd, the word is automatically replaced by the word 0000000.


So the answer is: 0010100 0110011 0000000.

№8. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

The original message 1000100 1111101 1101001 was received as 1000101 1111101 1110001.

What will the received message look like after processing?

1) 0000000 1111101 0000000

2) 0000000 1111101 1110001

3) 1000101 1111101 0000000

4) 1000100 0000000 1101001

Explanation.

Let's process each word of the received message. The first word: 1000101, the sum of its digits is 3 - odd, the word is automatically replaced by the word 0000000. The second word: 1111101, the sum of its digits is 6 - even, the word does not change. The third word: 1110001, the sum of its 4 digits is even, the word does not change.

So the answer is: 0000000 1111101 1110001.

№9. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

Original message

1010101 0100100 1101001

was adopted as

1010001 0100100 1100000.

What will the received message look like after processing?

1) 0000000 0100100 0000000

2) 1010101 0000000 1101001

3) 0000000 0100100 1100000

4) 1010101 0100100 0000000

Explanation.

Let's process each word of the received message. The first word: 1010001, the sum of its digits is 3 - odd, the word is automatically replaced by the word 0000000. The second word: 0100100, the sum of its digits is 2 - even, the word does not change. The third word: 1100000, the sum of its digits is even, the word does not change.

So the answer is: 0000000 0100100 1100000.

№10. In some information system, information is encoded in binary six-bit words. When transmitting data, distortion is possible, so a seventh (check) digit is added to the end of each word so that the sum of the digits of the new word, including the check digit, is even. For example, 0 will be added to the right of the word 110011, and 1 will be added to the right of the word 101100.

After receiving the word, it is processed. In this case, the sum of its digits, including the control one, is checked. If it is odd, it means that there was a failure when transmitting this word, and it is automatically replaced by the reserved word 0000000. If it is even, it means that there was no failure or there was more than one failure. In this case, the accepted word is not changed.

The original message 1010101 0101011 0001010 was received as 1010111 0101011 0001001.

What will the received message look like after processing?

1) 0000000 0101011 0000000

2) 1010111 0000000 0000000

3) 1010111 0000000 0001001

4) 0000000 0101011 0001001

Explanation.

Let's process each word of the received message. The first word: 1010111, the sum of its digits is 5 - odd, the word is automatically replaced by the word 0000000. The second word: 0101011, the sum of its digits is 4 - even, the word does not change. The third word: 0001001, the sum of its digits of 2 is even, the word does not change.

So the answer is: 0000000 0101011 0001001.

Addition and multiplication operation

№1. The Arithmetic performer has two commands, which are assigned numbers:

1. add 2,

2. multiply by 3.

The first of them increases the number on the screen by 2, the second triples it.

For example, 21211 - this is a program

multiply by 3

add 2

multiply by 3

add 2

add 2,

which converts the number 1 to the number 19.

Record the order of commands in the conversion program numbers 3 to number 69 containing no more than 5 commands, indicating only the command numbers. If there is more than one such program, then write down any of them.

Explanation.

Let's go from the reverse, and then write the resulting sequence of commands from right to left. If a number is not a multiple of 3, then it is obtained by adding 2, and if it is a multiple, then by multiplying by 3.

69 = 23 * 3 (team 2),

23 = 21 + 2 (team 1),

21 = 7 * 3 (team 2),

7 = 5 + 2 (team 1),

5 = 3 + 2 (command 1).

Let's write down the order of commands and get the answer: 11212

№2. The machine receives a three-digit number as input. Based on this number, a new number is constructed according to the following rules.

1. The first and second, as well as the second and third digits of the original number are added.

2. The resulting two numbers are written one after another in ascending order (without separators).

Example. Original number: 348. Sums: 3+4 = 7; 4+8 = 12. Result: 712.

Specify the smallest number, as a result of which the machine will produce the number 1115.

Explanation.

Since the numbers are written in ascending order, one sum of the digits of two digits is 11, the other is 15. In order for the number to be the smallest, it is necessary that the highest digits contain the smallest possible digit, therefore the sum of the highest digits must be smaller. When decomposing 11 into terms, it is necessary that one of them be the minimum possible, so let's imagine 11 as the sum of 2 and 9, these are the first two digits of the desired number. Then the third digit is 15 − 9 = 6. Therefore, the required number is 296.

Answer: 296.

№3. The performer TROITEL has two teams, which are assigned numbers:

1. subtract 1

2. multiply by 3

The first of them decreases the number on the screen by 1, the second increases it three times.

Write down the order of commands in the program for getting from number 3 to number 16, containing no more than 5 commands, indicating only the command numbers.

(For example, program 21211 is program

multiply by 3

subtract 1

multiply by 3

subtract 1

subtract 1

which converts the number 1 to 4.)

Explanation.

Multiplication by a number is not invertible for any number, therefore, if we go from the number 16 to the number 3, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 16 is not divisible by 3, which means it is obtained by subtracting one from the number 17: 16 = 17 - 1 (command 1).

Let's repeat the reasoning for the number 17: 17 = 18 - 1 (team 1).

2) Since we want to receive no more than 5 commands, to obtain the number 18 it is advantageous to use multiplication: 18 = 6 * 3 (command 2).

For the number 6, we apply the second reasoning: 6 = 2 * 3 (team 2), and the number 2 is obtained as 2 = 3 - 1 (team 1).

Then we finally get the answer: 12211

№4. The performer Triplet has two teams, which are assigned numbers:

1. subtract 2

2. multiply by three

The first of them reduces the number on the screen by 2, the second triples it. Write down the order of commands in the program for getting from 11 to 13, containing no more than 5 commands, indicating only the command numbers. (For example, 21211 is a program:

multiply by three

subtract 2

multiply by three

subtract 2

subtract 2,

which converts the number 2 to 8). (If there is more than one such program, then write down any of them.)

Explanation.

Multiplication by a number is not reversible for any number, therefore, if we go from the number 13 to the number 11, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 13 is not divisible by 3, which means it is obtained by subtracting two from the number 15: 13 = 15 - 2 (team 1).

2) Since we want to receive no more than 5 commands, to obtain the number 15 it is advantageous to use multiplication: 15 = 5 * 3 (command 2).

5 = 7 - 2 (team 1);

7 = 9 - 2 (team 1);

9 = 11 - 2 (team 1).

№5. The performer Excellent has two teams, which are assigned numbers:

1. add 1

2. multiply by 5

By performing the first of them, the Excellent student adds 1 to the number on the screen, and by performing the second, he multiplies it by 5. Write down the order of commands in the program, which from number 2 gets the number 101 and contains no more than 5 commands. Enter only command numbers.

For example, program 1211 is a program

add 1

multiply by 5

add 1

add 1

This program converts the number 2 to the number 17.

Explanation.

Let's solve the problem in reverse, and then write the received commands from right to left.

If the number is not divisible by 5, then obtained through command 1, if divisible, then through command 2.

101 = 100 + 1 (command 1),

100 = 20 * 5 (team 2),

20 = 4 * 5 (team 2),

4 = 3 + 1 (command 1),

3 = 2 + 1 (command 1).

Final answer: 11221.

№6. The performer Troechnik has two teams, which are assigned numbers:

1. add 2,

2. multiply by 3.

The first of these commands increases the number on the screen by 2, and the second multiplies it by 3. The executor's program Three is a sequence of command numbers. For example, 1211 is a program

add 2

multiply by 3

add 2

add 2

This program converts, for example, the number 2 to the number 16.

Write a program that converts the number 12 to the number 122 and contains no more than 5 commands. If there is more than one such program, write down any of them.

Explanation.

Multiplication by a number is not reversible for any number, so if we go from the number 122 to the number 12, then we will definitely restore the program. Received commands will be written from right to left.

1) The number 122 is not divisible by 3, which means it is obtained by adding two to the number 120: 122 = 120 + 2 (command 1).

2) Since we want to receive no more than 5 commands, to obtain the number 120 it is advantageous to use multiplication: 120 = 40 * 3 (command 2).

3) The number 40 is not divisible by 3, which means it is obtained by adding two to the number 38: 40 = 38 + 2 (command 1).

4) The number 38 is not divisible by 3, which means it is obtained by adding two to the number 36: 38 = 36 + 2 (command 1).

5) For the number 36: 36 = 12 * 3 (command 2).

The required sequence of commands: 21121.

№7. Some executor can only execute 2 commands:

1. Add 1 to a number

2. Number multiplied by 2

Write down the order of commands in the program for obtaining from number 17 the number 729, containing no more than 13 commands, indicating only the command numbers

Explanation.

To solve this problem, you should go “from the end”, that is, from the number 729 you will get the number 17. Accordingly, both operations must be inverted: operation 1 will mean subtracting from the number 1, operation 2 will mean dividing the number by 2.

Let's use the algorithm: if the number is not divisible by two, we subtract 1 from it, if it is divisible, we divide by 2, but if, when divided by 2, the number becomes less than 17, we subtract one from it.

Answer: 1111121212221.

№8.

1. add 3,

2. multiply by 5.

Write down the order of commands in a program that contains no more than 5 commands and converts the number 4 to the number 530.

In your answer, indicate only the command numbers, do not put spaces between the numbers.

Yes, for the program

multiply by 5

add 3

add 3

you need to write: 211. This program converts, for example, the number 8 to the number 46.

Explanation.

Multiplication by a number is not reversible for any number, therefore, if we go from the number 530 to the number 4, we will definitely restore the program. Received commands will be written from right to left.

If the number is not a multiple of 5, then subtract 3, and if it is a multiple, then divide by 5.

Consider a program that converts the number 530 to the number 4:

1) 530 / 5 = 106 (team 2).

2) 106 − 3 = 103 (team 1).

3) 103 − 3 = 100 (command 1).

4) 100 / 5 = 20 (team 2).

5) 20 / 5 = 4 (team 2).

Let's write the sequence of commands in reverse order and get the answer: 22112.

№9. Performer ThreeFive has two teams, which are assigned numbers:

1. add 3,

2. multiply by 5.

By completing the first of them, ThreeFive adds 3 to the number on the screen, and by completing the second, it multiplies this number by 5.

Write down the order of commands in a program that contains no more than 5 commands and converts the number 1 to the number 515.

In your answer, indicate only the command numbers, do not put spaces between the numbers.

Yes, for the program

multiply by 5

add 3

add 3

you need to write: 211. This program converts, for example, the number 4 to the number 26.

Explanation.

Multiplication by a number is not invertible for any number, therefore, if we go from the number 515 to the number 1, we will definitely restore the program. Received commands will be written from right to left.

If the number is not a multiple of 5, then subtract 3, and if it is, then divide by 5.

Consider a program that converts the number 515 to the number 1:

1) 515 / 5 = 103 (team 2).

2) 103 − 3 = 100 (command 1).

4) 20 / 5 = 4 (team 2).

5) 4 − 3 = 1 (command 1).

Let's write the sequence of commands in reverse order and get the answer: 12212.

№10. The Accord performer has two teams, which are assigned numbers:

1. subtract 1

2. multiply by 5

By executing the first of them, Chord subtracts 1 from the number on the screen, and by executing the second, he multiplies this number by 5. Write down the order of commands in a program that contains no more than 5 commands and converts the number 5 to the number 98. In your answer, indicate only the command numbers, Do not put spaces between numbers. Yes, for the program

multiply by 5

subtract 1

subtract 1

you need to write: 211. This program converts, for example, the number 4 to the number 18.

Explanation.

Multiplication by a number is not reversible for any number, so if we go from the number 98 to the number 5, we will definitely restore the program. Received commands will be written from right to left.

If the number is not a multiple of 5, then add 1, and if it is a multiple, then divide by 5.

Consider a program that converts the number 98 to the number 5.

1) 98 + 1 = 99 (command 1).

2) 99 + 1 = 100 (command 1).

3) 100 / 5 = 20 (team 2).

4) 20 / 5 = 4 (team 2).

5) 4 + 1 = 5 (command 1).

Let's write the sequence of commands in reverse order and get the answer: 12211.

Checking a numerical sequence for compliance with the algorithm

№1.

a) in the first place there is one of the numbers 1, 2, 3, which is not in the last place;

b) the middle digit of a number is either 2, 3, or 5, but not in first place.

Explanation.

You can immediately discard answer 4, which does not satisfy the condition “it is known that the number is even.”

In option 1) the number in the last place coincides with the number in the first place, which does not satisfy condition a).

In option 3) the first and middle digits are the same, which does not satisfy condition b).

№2.

a) in the first place there is one of the numbers 5, 6, 8, which is not in the last place;

b) the middle digit of a number is either 5, 7, or 9, but not in first place.

Which of the following numbers satisfies all of the conditions given?

Explanation.

You can immediately discard answer 1, which does not satisfy the condition “it is known that the number is even.” In option 2) the number 8 in the last place coincides with the number in the first place, which does not satisfy condition a). In option 3) the first and middle digits are the same, which does not satisfy condition b).

Therefore, the correct answer is number 4.

№3. A five-digit number is formed from the numbers 0, 1, 2, 3, 4, 5. It is known that the number is odd and, in addition, is formed according to the following rules:

a) when this number is divided by 3, the remainder is 0;

b) the digit in the least significant digit is 1 greater than the digit in the most significant digit.

Which of the following numbers satisfies all of the conditions given?

Explanation.

You can immediately discard answer 2, which does not satisfy the condition “it is known that the number is odd.”

In option 3) the number 3 of the lowest digit is greater than the number 1 in the most significant digit by 2, which does not satisfy condition b).

The sum of the numbers in option 4) is 13, which is not divisible by 3, i.e. this option does not satisfy condition a).

№4. A five-digit number is formed from the numbers 0, 5, 6, 7, 8, 9. It is known that the number is even and, in addition, is formed according to the following rules:

a) the number is divisible by 4 without a remainder;

b) the digit of the least significant digit is 1 greater than the digit of the most significant digit.

Which of the following numbers satisfies all of the conditions given?

Explanation.

Options 1), 3) and 4) do not satisfy condition b), because the digit of the least significant digit is less than the digit in the most significant digit.

Therefore, the correct answer is number 2.

№5.

Which of the following numbers satisfies all of the conditions given?

Explanation.

Options 2) and 4) have consecutively repeated numbers, which means they do not satisfy condition b). Option 1) is not suitable because it contains the even number 6, which is not included in the list of digits from which the number is formed.

The correct answer is listed at number 3.

№6. A five-digit number is formed from the numbers 0, 1, 2, 4, 6, 8. It is known that the number is formed according to the following rules:

a) when a number is divided by 5, the remainder is 0;

b) the modulus of the difference of any two adjacent digits does not exceed 2.

Which of the following numbers satisfies all of the conditions given?

Explanation.

You can immediately discard option 4), which does not satisfy condition a).

Options 2) have a difference of 4 between adjacent numbers 6 and 2, and option 3) have a difference of 3 between adjacent numbers 8 and 5, so they do not satisfy condition b)

Therefore, the correct answer is listed as number 1.

№7. A five-digit number is formed from the numbers 0, 1, 2, 3, 4, 5. It is known that the number is even and, in addition, is formed according to the following rules:

a) the magnitude of the difference between any two adjacent digits is less than 1;

b) the number is divisible by 4 without a remainder.

Which of the following numbers satisfies all of the conditions given?

Explanation.

Options 1) and 2) are not suitable because they are four-digit.

Option 3) is not suitable, because the number 22222 = 11111 * 2, the first factor is odd, the second is not divisible by 4, therefore the number 22222 is also not divisible by 4 without a remainder.

The correct answer is listed at number 4.

№8. A five-digit number is formed from the numbers 0, 1, 3, 5, 7, 9. It is known that the number is formed according to the following rules:

a) the number is divisible by 10 without a remainder;

b) the modulus of the difference of any two adjacent digits is at least 1.

Which of the following numbers satisfies all of the conditions given?

Explanation.

a) option 1 does not fit this condition, so when divided by 10 the result is a number with a remainder.

b) for the difference module to be at least one, adjacent digits must be different; options 1, 2 and 4 do not fit this condition.

The correct answer is listed at number 3.

№9. Ivan invited his friend Sasha to visit, but did not tell him the code for the digital lock of his entrance, but sent the following message: “Initial sequence: 8, 1, 6, 2, 4. First, increase all numbers less than 5 by 1. Then all even numbers greater than 5 divided by 2. Then remove all odd numbers from the resulting sequence.” After completing the steps indicated in the message, Sasha received the code for the digital lock:

3) 4, 1, 2, 3, 5

Explanation.

Let's perform all the steps sequentially:

8 1 6 2 4 => 8 2 6 3 5 => 4 2 3 3 5 => 4 2

№10. Anya invited her friend Natasha to visit, but did not tell her the code for the digital lock of her entrance, but sent the following message: “In the sequence 4, 1, 9, 3, 7, 5, from all numbers that are greater than 4, subtract 3, and then remove all odd numbers from the resulting sequence.” After completing the steps indicated in the message, Natasha received the following code for the digital lock:

4) 4, 1, 6, 3, 4, 2

Explanation.

Let's perform all the steps sequentially:

From 4 1 9 3 7 5 we get 4 1 6 3 4 2.

From 4 1 6 3 4 2 we get 4 6 4 2.

1. Task 6 No. 6. ExecutorDraftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the commandMove to ( a , b ) (Wherea, b (x, y) to the point with coordinates(x + a, y + b) . If the numbersa, b

(4, 2) , then the command Move to (2, −3) (6, −1).

Record

Repeat k times

Team1 Team2 Team3

End

Team1 Team2 Team3 will happen againk once.

Repeat 2 times

Move by (−6, −4)

Team1 ?

1) Shift to (−2, −1) 2) Shift to (1, 1) 3) Shift to (−4, −2) 4) Shift to (2, 1)

2. Task 6 No. 26. The draftsman was given the following algorithm to execute:

Repeat 4 times

Command1 Move to (3, 3) Move to (1,−2) End

Shift by (−8, 12)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift by (−2, −4) 2) Shift by (4,−13) 3) Shift by (2, 4) 4) Shift by (−8, −16)

3. Task 6 No. 46. The draftsman was given the following algorithm to execute:

Repeat 3 times

Move to (3, 9)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift by (3, 4) 2) Shift by (−5, −10) 3) Shift by (−9, −12) 4) Shift by (−3, −4)

4. Task 6 No. 66. The draftsman was given the following algorithm to execute:

Repeat 3 times

Command1 Move to (3, 2) Move to (2, 1) End

Move to (−9, −6)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift to (−6, −3) 2) Shift to (4, 3) 3) Shift to (−2, −1) 4) Shift to (2, 1)

5. Task 6 No. 86. The draftsman was given the following algorithm to execute:

Repeat 2 times

Shift by (4, −6)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift by (6, −2) 2) Shift by (−8, 5) 3) Shift by (−12, 4) 4) Shift by (−6, 2)

6. Task 6 No. 106. The draftsman was given the following algorithm to execute:

Repeat 4 times

Command1 Move to (1, 3) Move to (1, −2) End

Shift by (−4, −12)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift to (1,−2) 2) Shift to (12, 4) 3) Shift to (2, 11) 4) Shift to (−1, 2)

7. Task 6 No. 126. The draftsman was given the following algorithm to execute:

Repeat 4 times

Command1 Move to (3, 2) Move to (2, 1) End

Move to (−12, −8)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift to (−8, −4) 2) Shift to (−2, −1) 3) Shift to (7, 5) 4) Shift to (2, 1)

Task 6. Algorithm for a specific executor with a fixed set of commands

8. Task 6 No. 146. ExecutorTurtle moves on the computer screen, leaving a trace in the form of a line. At each specific moment, the position of the performer and the direction of his movement are known. The performer has two commands:Forward n Right m (where m is an integer), causing a change in the direction of movement by m degrees clockwise.

Record

Repeat 9 [Forward 50 Right 60]

    regular 6-gon 2) regular triangle 3) open broken line 4) regular 9-gon

9. Task 6 No. 166. The turtle was given the following algorithm to execute:Repeat 7 [Forward 70 Right 120] .

    regular 6-gon 2) open broken line 3) regular 7-gon 4) regular triangle

10. Task 6 No. 186. The turtle was given the following algorithm to execute:Repeat 9 [Forward 70 Right 90] . What shape will appear on the screen?

1) open broken line 2) regular ninegon 3) regular octagon

4) regular quadrilateral

11. Task 6 No. 206. The turtle was given the following algorithm to execute:Repeat 5 [Forward 80 Right 60] . What shape will appear on the screen?

    regular pentagon 2) regular triangle 3) regular hexagon 4) open broken line

12. Task 6 No. 226. The turtle was given the following algorithm to execute:Repeat 5 [Forward 80 Right 90] . What shape will appear on the screen?

1) open polyline 2) regular hexagon

3) regular pentagon 4) regular quadrilateral

13. Task 6 No. 246. The turtle was given the following algorithm to execute:Repeat 5 [Forward 100 Right 120] What shape will appear on the screen?

1) regular pentagon 2) open broken line

3) regular hexagon 4) regular triangle

14. Task 6 No. 266. The turtle was given the following algorithm to execute:Repeat 5 [Forward 100 Right 60] What shape will appear on the screen?

1) regular triangle 2) regular hexagon

3) regular pentagon 4) open broken line

Task 6. Algorithm for a specific executor with a fixed set of commands

15. Task 6 No. 286. Move to ( a, b ) (Where a, b - integers), moving the Draftsman from the point with coordinates (x, y) to the point with coordinates(x + a, y + b) . If the numbersa, b positive, the value of the corresponding coordinate increases; if negative, it decreases.

For example, if the Draftsman is at a point with coordinates (4, 2) , then the command Move to (2, −3) will move the Draftsman to the point (6, −1).

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commandsTeam1 Team2 Team3 will happen againk once.

The draftsman was given the following algorithm to execute:

Repeat 3 times

Command1 Move to (3, 3) Move to (1, −2) End

Shift by (−6, 9)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift by (−6, −12) 2) Shift by (2, −10) 3) Shift by (2, 4) 4) Shift by (−2, −4)

16. Task 6 No. 306. The draftsman was given the following algorithm to execute:

Repeat 2 times

Command1 Move to (1, 3) Move to (1, −2) End

Move to (2, 6)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the commandTeam1 ?

1) Shift by (− 6, − 8) 2) Shift by (3, 4) 3) Shift by (− 4, − 7) 4) Shift by (− 3, − 4)

17. Task 6 No. 326. The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift to (−2, −1) Shift to (3, 2) Shift to (2,1) End

1) Shift to (−9, −6) 2) Shift to (6, 9) 3) Shift to (−6, −9) 4) Shift to (9, 6)

18. Task 6 No. 347. The draftsman was given the following algorithm to execute:

Repeat 4 times

Shift to (−1, −1) Shift to (2, 2) Shift to (3, −3) End

1) Shift to (−16, −8) 2) Shift to (16, 8) 3) Shift to (16, −8) 4) Shift to (−16, 8)

19. Task 6 No. 367. The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift to (1, 1) Shift to (2, 2) Shift to (1, −3) End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift to (12, 0) 2) Shift to (0, 12) 3) Shift to (0, -12) 4) Shift to (-12, 0)

20. Task 6 No. 387. The draftsman was given the following algorithm to execute:

Repeat 5 times

Shift to (1, 2) Shift to (−2, 2) Shift to (2, −3) End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift by (−5, −2) 2) Shift by (−3, −5) 3) Shift by (−5, −4) 4) Shift by (−5, −5)

Task 6. Algorithm for a specific executor with a fixed set of commands

21. Task 6 No. 407. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the commandMove to ( a, b ) (Where a, b - integers), moving the Draftsman from the point with coordinates (x, y) to the point with coordinates(x + a, y + b) . If the numbersa, b positive, the value of the corresponding coordinate increases; if negative, decreases.

For example, if the Draftsman is at a point with coordinates (4, 2) , then the command Move to (2, −3) will move the Draftsman to the point (6, −1).

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commandsTeam1 Team2 Team3 will happen againk once.

The draftsman was given the following algorithm to execute:

Repeat 7 times

Shift to (−1, 2) Shift to (−5, 2) Shift to (4, −4) End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift to (14, 0) 2) Shift to (15, 1) 3) Shift to (16, 2) 4) Shift to (17, 3)

22. Task 6 No. 427. The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift to (−1, 0) Shift to (0, 2) Shift to (4, −4) End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

    Shift to (6, 0) 2) Shift to (−6, 2) 3) Shift to (−9, 6) 4) Shift to (9, 3)

23. Task 6 No. 447. The draftsman was given the following algorithm to execute:

Repeat 7 times

Shift to (−1, 2) Shift to (−2, 2) Shift to (4, −4) End

What are the coordinates of the point from which the Draftsman began his movement if he ended up at a point with coordinates (0, 0)?

1) (7, 0) 2) (−7, 0) 3) (0, −7) 4) (0, 7)

24. Task 6 No. 467. The draftsman was given the following algorithm to execute:

Repeat 7 times

Shift to (−1, 2) Shift to (−2, 2) Shift to (4, −5) End

What are the coordinates of the point from which the Draftsman began his movement if he ended up at a point with coordinates (1, 1)?

1) (6, 8) 2) (−6, 8) 3) (8, −6) 4) (8, 6)

25. Task 6 No. 487. The draftsman was given the following algorithm to execute:

Repeat 5 times

What are the coordinates of the point from which the Draftsman began his movement if he ended up at a point with coordinates (−1, −1)?

1) (−11, 4) 2) (4, −11) 3) (8, 22) 4) (22, 8)

26. Task 6 No. 507. The draftsman was given the following algorithm to execute:

Repeat 5 times

Shift to (0, 1) Shift to (−2, 3) Shift to (4, −5) End

The coordinates of the point from which the Draftsman began his movement are (3, 1). What are the coordinates of the point where he ended up?

Task 6. Algorithm for a specific executor with a fixed set of commands

27. Task 6 No. 527. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command Move to ( a, b ) (Where a, b - integers), moving the Draftsman from the point with coordinates (x, y) to the point with coordinates (x + a, y + b) . If the numbers a, b positive, the value of the corresponding coordinate increases; if negative, decreases.

For example, if the Draftsman is at a point with coordinates (4, 2) , then the command Move to (2, −3) will move the Draftsman to the point (6, −1).

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commands Team1 Team2 Team3 will happen again k once.

The draftsman was given the following algorithm to execute:

Repeat 5 times

Shift to (0, 1) Shift to (−1, 4) Shift to (3, −6) End

The coordinates of the point from which the Draftsman started moving are (4, 0). What are the coordinates of the point where he ended up?

1) (15, −6) 2) (14, −5) 3) (13, −4) 4) (12, −3)

28. Task 6 No. 547. The draftsman was given the following algorithm to execute:

Move by (−1,1) Repeat 4 times

Shift to (3,1) Shift to (0, 2) Shift to (−1, 4) end

1) Shift to (8, 28) 2) Shift to (7, 29) 3) Shift to (−8, −28) 4) Shift to (−7, −29)

29. Task 6 No. 567. The draftsman was given the following algorithm to execute:

Move to (−5, 2) Repeat 5 times

Shift to (2, 0) Shift to (−3, −3) Shift to (−1, 0) end

What command can this algorithm be replaced with?

1) Shift by (−10, −15) 2) Shift by (15, 13)

3) Shift to (10, 15) 4) Shift to (−15, −13)

30. Task 6 No. 587. Forward n (where n is an integer), causing the Turtle to move n steps in the direction of movement; Right m Repeat k [Command1 Command2 Command3] means that the sequence of commands in brackets will be repeated k times.

The turtle was given the following algorithm to execute: Repeat 180 [Forward 45 Right 90] . What shape will appear on the screen?

1) regular 180-gon 2) square 3) regular octagon 4) open broken line

31. Task 6 No. 607. The turtle was given the following algorithm to execute: Repeat 360 [Forward 30 Right 60] . What shape will appear on the screen?

1) regular 360-gon 2) regular triangle

3) regular 6-gon 4) open polyline

Task 6. Algorithm for a specific executor with a fixed set of commands

32. Task 6 No. 627.

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commands Team1 Team2 Team3 will be repeated k times. If an Ant encounters a cube on its way, it moves it along the way. Let, for example, the cube be in cell E4. If the Ant follows the commands right 2 down 2 , then he himself will end up in a cage EZ , and the cube is in the cage E2 .

Repeat 2 times

Right 2 down 1 left 2

End

1) D2 2) E2 3) E1 4) GZ

33. Task 6 No. 647. Let the Ant and the cube be positioned as shown in the picture. The ant was given the following algorithm to execute:

Repeat 4 times

Down 2 right 1 up 2

End

In which cell will the cube end up after executing this algorithm?

1) G6 2) E4 3) D1 4) E6


34. Task 6 No. 667.

Down 4

Repeat 3 times

Right 1 up 1 left 1

1) COM 2) SCRAP 3) HOUSE 4) TOM

35. Task 6 No. 687. Let the Ant and the cubes be arranged as shown in the picture. The ant was given the following algorithm to execute:

Down 3

Repeat 2 times

Right 1 up 1 left 1

What word will be written in line 6 after executing this algorithm?

1) COM 2) SCRAP 3) HOUSE 4) TOM

Task 6. Algorithm for a specific executor with a fixed set of commands

36. Task 6 No. 707. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the commandMove to ( a, b ) (Wherea, b - integers), moving the Draftsman from the point with coordinates(x, y) to the point with coordinates(x + a, y + b) . If the numbersa, b positive, the value of the corresponding coordinate increases; if negative, it decreases.

For example, if the Draftsman is at a point with coordinates (4, 2) , then the command Move to (2, −3) will move the Draftsman to the point (6, −1).

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commandsTeam1 Team2 Team3 will happen againk once.

The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift by (−2, −3) Shift by (3, 2) Shift by (−4,0)

End

What one command can this algorithm be replaced with so that the Draftsman ends up at the same point as after executing the algorithm?

1) Shift to (−9, −3) 2) Shift to (−3, 9) 3) Shift to (−3, −1) 4) Shift to (9, 3)

37. Task 6 No. 750. Performer Ant moves across a field divided into cells. The field size is 8x8, rows are numbered, columns are designated by letters. An ant can execute movement commands:

Up N, Down N, Right N, Left N (N is an integer from 1 to 7), moving the performer N cells up, down, right or left, respectively.

Record

Repeat k times

Team1 Team2 Team3

kts

means that the sequence of commandsTeam1 Team2 Team3 will be repeated k times. If an Ant encounters a cube on its way, it moves it along the way. For example, let the cube be in a cellG2 , and the ant is in a cageD 2 . If the Ant follows the commandleft 2 , then he himself will end up in a cageAT 2 , and the cube is in the cageB2 .

Let the Ant and the cube be positioned as shown in the picture. The ant was given the following algorithm to execute:

Repeat 3 times

down 1 left 1 up 1 right 1 up 1

kts

In which cell will the cube end up after executing this algorithm? 1) B5 2) G5 3) G4 4) D5

38. Task 6 No. 770. Let the Ant and the cube be positioned as shown in the picture. The ant was given the following algorithm to execute:

repeat 2 times

up 1 left 2 down 1

kts

In which cell will the cube end up after executing this algorithm?

1) B5 2) B5 3) A5 4) B4

39. Task 6 No. 802. The draftsman was given the following algorithm to execute:

Move to (3, 2)

Repeat 3 times

Shift by (1, –1) Shift by (2, –3) Shift by (4, 0)

End

1) Shift by (–21, 12) 2) Shift by (21, –12) 3) Shift by (–24, 10) 4) Shift by (24, –10)

40. Task 6 No. 822. The draftsman was given the following algorithm to execute:

Shift by (−2, 1)

Repeat 2 times

Shift to (0, 5) Shift to (2, 1) Shift to (4, 6)

End

Which of the following commands moves the Draftsman to the same point as the given algorithm?

1) Shift by (10, 25) 2) Shift by (–10, –25) 3) Shift by (12, 24) 4) Shift by (–12, –24)

41. Task 6 No. 844. The draftsman was given the following algorithm to execute:

Shift by (–4, 8)

Repeat 4 times

Command1 Move to (–2, –5) Move to (4, 6)

end

1) Shift by (2, –9) 2) Shift by (–1, –3) 3) Shift by (1, 3) 4) Shift by (–3, –1)

Task 6. Algorithm for a specific executor with a fixed set of commands

42. Task 6 No. 864. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command Move to (a, b) (Where a, b – integers), moving the Draftsman from the point with coordinates (x, y) , to the point with coordinates (x+a, y+b) . If the numbers a, b positive, the value of the corresponding coordinate increases, if negative, it decreases.

For example, if the Draftsman is at a point with coordinates (1, 1), then the command Shift by (–2, 4) will move it to point (–1, 5).

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commands Team1 Team2 Team3 will be repeated k times.

The draftsman was given the following algorithm to execute:

Move by (–3, –6)

Repeat 3 times

Command1 Move to (2, –5) Move to (3, 3)

end

What command should the Draftsman execute instead of Command1 in order to return to the starting point from which he started moving?

1) Shift by (–4, –4) 2) Shift by (–2, 8) 3) Shift by (4, –4) 4) Shift by (–4, 4)

43. Task 6 No. 885. The draftsman was given the following algorithm to execute:

Shift by (–3, 1)

Repeat 2 times

Shift by (1, 1) Shift by (−3, 2) Shift by (0, −4)

End

1) Shift to (–7,–1) 2) Shift to (7, 1) 3) Shift to (–4,–2) 4) Shift to (4, 2)

44. Task 6 No. 905. The draftsman was given the following algorithm to execute:

Move to (2, 6)

Repeat 2 times

Shift by (2, 1) Shift by (–5, 4) Shift by (1,–4)

End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift by (4, –2) 2) Shift by (–4, 2) 3) Shift by (2, –8) 4) Shift by (–2, 8)

45. Task 6 No. 925. The draftsman was given the following algorithm to execute:

Move to (1, 3)

Repeat 4 times

Shift by (0, 2) Shift by (3, 1) Shift by (–4, –4)

End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift to (–3, –1) 2) Shift to (3, 1) 3) Shift to (–4, –4) 4) Shift to (4, 4)

46. ​​Task 6 No. 945. The draftsman was given the following algorithm to execute:

Move to (2, –7)

Repeat 6 times

Shift by (0, 1) Shift by (–1, 1) Shift by (–2, 2)

End

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift by (–18, 24) 2) Shift by (18, –24) 3) Shift by (16, –17) 4) Shift by (–16, 17)

Task 6. Algorithm for a specific executor with a fixed set of commands

47. Task 6 No. 1017. Performer The turtle moves on the computer screen, leaving a trace in the form of a line. At each specific moment, the position of the performer and the direction of his movement are known. The performer has two commands: Forward n (where n is an integer), causing the Turtle to move n steps in the direction of movement; Right m (where m is an integer), causing a change in the direction of movement by m degrees clockwise. RecordRepeat k [Command1 Command2 Command3] means that the sequence of commands in brackets will be repeated k times.

When performing which of the following algorithms did a regular triangle appear on the screen?

1) Repeat 3 [Forward 50 Right 20 Right 25] 2) Repeat 3 [Forward 50 Right 100 Right 20]

3) Repeat 6 [Forward 50 Right 10 Right 20] 4) Repeat 6 [Forward 50 Right 20 Right 40]

48. Task 6 No. 1037. When performing which of the following algorithms did a regular hexagon appear on the screen?

1) Repeat 6 [Forward 100 Right 90] 2) Repeat 6 [Forward 100 Right 9]

3) Repeat 6 [Forward 100 Right 60 Right 60] 4) Repeat 6 [Forward 100 Right 20 Right 40]

49. Task 6 No. 1057. The turtle was given the following algorithm to execute:

Repeat 6 [Forward 5 Right 30]

What shape will appear on the screen?

1) open broken line 2) regular triangle

3) regular 5-gon 4) regular 6-gon

50. Task 6 No. 1077. The turtle was given the following algorithm to execute:

What shape will appear on the screen?

1) square 2) regular 12-gon 3) regular octagon 4) open broken line

51. Task 6 No. 1100. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The Draftsman can issue the Move to (a, b) command (where a, b are integers), which moves the Draftsman from a point at coordinates (x, y) to a point at coordinates (x + a, y + b). If the numbers a, b are positive, the value of the corresponding coordinate increases, if they are negative, it decreases.

For example, if the Draftsman is at a point with coordinates (4, 2), then the Move to (2, –3) command will move the Draftsman to the point (6, –1). Record

Repeat k times

Team1 Team2 Team3

End means that the sequence of commands Command1 Command2 Command3 will be repeated k times.

The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift by (–2, –1) Shift by (3, 2) Shift by (2, 1)

End

What command does the Draftsman need to execute in order to return to the starting point from which he started moving?

1) Shift to (9, 6) 2) Shift to (–6, –9) 3) Shift to (6, 9) 4) Shift to (–9, –6)

52. Task 6 No. 1120. The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift by (1, 3) Shift by (–2, –5)

end

Move to (4, 8)

1) Shift by (–1, 2) 2) Shift by (–1, –2) 3) Shift by (1, –2) 4) Shift by (–2, 1)

53. Task 6 No. 1140. The draftsman was given the following algorithm to execute:

Shift by (–3, 1)

Repeat 2 times

Shift by (1, 1) Shift by (−3, 2) Shift by (0,−4)

End

What command does the Draftsman need to execute in order to return to the starting point from which he started moving?

1) Shift to (4, 2) 2) Shift to (–4, –2) 3) Shift to (7, 1) 4) Shift to (–7, –1)

Task 6. Algorithm for a specific executor with a fixed set of commands

54. Task 6 No. 1160. Performer The turtle moves on the computer screen, leaving a trace in the form of a line. At each specific moment, the position of the performer and the direction of his movement are known. The performer has two commands: Forward n (where n is an integer), causing the Turtle to move n steps in the direction of movement; Right m (where m is an integer), causing a change in the direction of movement by m degrees clockwise. RecordRepeat k [Command1 Command2 Command3] means that the sequence of commands in brackets will be repeated k times.

The turtle was given the following algorithm to execute: Repeat 12 [Right 45 Forward 20 Right 45] . What shape will appear on the screen?

1) open broken line 2) regular 12-gon 3) square 4) regular octagon

55. Task 6 No. 1239. Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command Shift to (a, b ) (Where a, b - integers), moving the Draftsman from a point with coordinates (x, y) to a point with coordinates (x + a, y + b ). If the numbers a, b positive, the value of the corresponding coordinate increases, if negative, it decreases. For example, if the Draftsman is at a point with coordinates (4, 2), then the Move to (2, –3) command will move the Draftsman to the point (6, –1).

Record

Repeat k times

Team1 Team2 Team3

End

means that the sequence of commands Team1 Team2 Team3

will happen again k once.

The draftsman was given the following algorithm to execute:

Repeat 2 times

Shift by (–3, –4) Shift by (3, 3) Shift by (1, –2)

End

What is the only command that the Draftsman must execute in order to return to the starting point from which he started?

1) Shift by (2, –6) 2) Shift by (–6, 2) 3) Shift by (6, –2) 4) Shift by (–2, 6)

56. Task 6 No. 1259. The draftsman was given the following algorithm to execute:

Repeat 3 times

Shift by (–2, –3) Shift by (3, 4)

end

Shift by (–4, –2)

What command must the Draftsman execute in order to return to the starting point from which he started moving?

1) Shift by (1, –1) 2) Shift by (–3, –1) 3) Shift by (–3, –3) 4) Shift by (–1, 1)

For this task you can get 1 point on the Unified State Exam in 2020

“Analysis and construction of algorithms for performers” is a rather complex educational material, and it was this that became the main topic of assignment No. 6 of the Unified State Exam in computer science. The type of test question can be very diverse. For example, you will have to check the letter sequence against the algorithm. In this case, the problem will present a series of letters, for example, A, Z, I, L, M, O, S, b, from which a certain word is formed. In this word, certain conditions are met, for example, the letters denoting vowel sounds do not stand next to each other, and it does not begin with a vowel sound, but with one that is located before the letter “P” in the Russian alphabet. Next will be a list of words from which the student must choose one that satisfies the listed conditions.

The sequences presented in task 6 of the Unified State Exam in computer science are not always alphabetic. It can also be a series of numbers. A certain number of variants of this test are devoted to the processing of garbled messages, the operations of addition, multiplication, division and squaring, as well as non-standard performers.

Methodical article: Solution of task A6 (Algorithm for a specific executor with a fixed set of commands) of the main state exam in grade 9 (OGE) using mathematical tools.

Description material : The article presents a method for solving task A6 of the main state exam (OGE) in computer science using mathematical tools.

Alternatively, this solution method can be used in an integrated geometry and computer science lesson in grade 9 when studying the topic “Sum of angles” in geometryn-gon", and in computer science when studying the topic "Algorithms" using the example of the performer "Draftsman".

To solve the problem, you need to remember the geometry course.

    What is convex and concave n -what kind of square n -a triangle is called regular, what is a broken line.

    Convexn-square

    Concaven-square

    Correctn-square

    broken line

II. Theorem on the sum of angles of a convex polygon

For a convex n-gon, the sum of the angles is 180°(n-2), Wheren– number of sides/angles.

III.

A triangle is a convex polygon.

At the triangle:

3 sides and 3 corners

The sum of the angles of a triangle is 180 O

sides are equal, angles are 60 O

Because:

60 O

And forn-square

Let's remember this formula!

Task A6 itself from the KIMs of the main state exam in computer science:

IV . Exercise A6 Performer The turtle moves on the computer screen, leaving a trace in the form of a line. At each specific moment, the position of the performer and the direction of his movement are known. The performer has two commands:Forward n (where n is an integer), causing the Turtle to move n steps in the direction of movement;Right m (where m is an integer), causing a change in the direction of movement by m degrees clockwise. RecordRepeat k [Command1 Command2 Command3] means that the sequence of commands in brackets will be repeated k times.

The turtle was given the following algorithm to execute:

Repeat 5 [Forward 80 Right 60] . What shape will appear on the screen?

1) regular pentagon
2) regular triangle
3) regular hexagon
4) open broken line

Solution: Turtle has 2 teams:Forward n , To the right m

Consider the teamForward 80 Right 60 outside the loop and draw:

So, in our problem the internal anglen- equals 120 O

Use for each answer option:

Video fragment from a consultation session (consultation before the computer science exam) in preparation for the OGE. Analysis of task number 6 from the OGE on the topic Algorithm for a specific performer with a fixed set of commands. Algorithm executors. In the video clip above you will find solution to task number 6 from OGE in computer science

Task 6:

Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The Draftsman can issue the Move to (a, b) command (where a, b are integers), which moves the Draftsman from a point with coordinates (x, y) to a point with coordinates (x + a, y + b). If the numbers a, b are positive, the value of the corresponding coordinate increases; if negative, it decreases.

V1. The draftsman was given the following algorithm to execute:

Repeat 2 times
Command1 Move to (3, 2) Move to (2, -1)
End
Shift by (6, −4)

After completing this algorithm, the Draftsman returned to the starting point. What command should be put instead of the command Team1?

V2. The draftsman was given the following algorithm to execute:

Repeat 3 times
Shift by (-2, -3) Shift by (3, 2) Shift by (-4, 0
end



Similar articles