How to set up smartphones and PCs. Informational portal
  • home
  • Windows 7, XP
  • Parsing text with regular expressions (RegExp) in Excel. What is the Delete key for? The cursor is

Parsing text with regular expressions (RegExp) in Excel. What is the Delete key for? The cursor is

Option No. 4147515

When completing tasks with a short answer, write in the answer field a number that corresponds to the number of the correct answer, or a number, word, sequence of letters (words) or numbers. The answer should be written without spaces or any additional characters. Separate the fractional part from the whole decimal point. You do not need to write the measurement units.


If the variant was set by the teacher, you can enter or upload answers to the tasks with a detailed answer into the system. The teacher will see the results of the short answer assignments and will be able to rate the uploaded answers to the extended answer assignments. The points given by the teacher will appear in your statistics.


Version for printing and copying in MS Word

In one of the Unicode encodings, each character is encoded in 16 bits. Determine the size of the following sentence in the given encoding: He ascended higher at the head of the rebellious Pillar of Alexandria.

Answer:

For which of the following names is the statement true:

NOT(First letter of a vowel) AND NOT(The last letter of the consonant)?

4) Tatiana

Answer:

The teacher Ivan Petrovich lives at the Antonovka station, and works at the Druzhba station. To be in time for lessons in the morning, he must go along the shortest road. Analyze the table and indicate the length of the shortest path from Antonovka station to Druzhba station:

Answer:

A file was stored in some directory Lily of the valley.dos... A subdirectory has been created in this directory May and the file Lily of the valley.dos moved to the created subdirectory. The full file name has become

D: \ 2013 \ Spring \ May \ Lily of the Valley.dos.

Please provide the full name of this file before moving.

2) D: \ 2013 \ Spring \ May \ Lily of the Valley.doc

3) D: \ 2013 \ Spring \ Lily of the Valley.doc

4) D: \ 2013 \ Lily of the valley.doc

Answer:

A fragment of a spreadsheet is given.

A B C D
1 2 4 6 8
2 = D1 / B1 = A1 + 2= C1 / 3

Which of the following formulas must be written in cell B2 so that the chart built after performing calculations on the values ​​of the range of cells A2: D2 matches the figure?

Answer:

Artist 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 a 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 located at a point with coordinates (4, 2) , then the command Move to(2, −3)will move the Draftsman to a point(6, −1).

Repeat k times

Team1 Team2 Team3

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

The draftsman was given the following algorithm for execution:

Repeat 3 pa

Move by (1, 1) Move by (2, 2) Move by (1, −3) End

What command should the Draftsman execute in order to return to the starting point from which he began to move?

1) Move to (12, 0)

2) Move to (0, 12)

3) Move by (0, -12)

4) Move by (-12, 0)

Answer:

The boys played spies and coded the message with a coded code. The message contains only letters from the given fragment of the code table:

ABVGDEF
10 101 12 102 122 22 120

Determine how many letters the message contains:

101212210102 .

Answer:

In the program ": =" denotes the assignment operator, the signs "+", "-", "*" and "/" - respectively the operations of addition, subtraction, multiplication and division. The rules for performing operations and the order of actions correspond to the rules of arithmetic. Determine the value of the variable a after running the algorithm:

In your answer, specify one integer - the value of the variable a.

Answer:

Write the value of the variable u resulting from the following program. The text of the program is given in five programming languages.

Answer:

The Ves table stores weight in kilograms for a group of students at a sports school (Ves is the first student, Ves is the second, and so on). Determine what will be printed as a result of the following algorithm, written in five algorithmic languages:

BASIC Python

DIM Ves (14) AS INTEGER

DIM i, n AS INTEGER

Ves (1) = 25: Ves (2) = 21

Ves (3) = 23: Ves (4) = 28

Ves (5) = 30: Ves (6) = 25

Ves (7) = 31: Ves (8) = 28

Ves (9) = 25: Ves (10) = 28

Ves (11) = 30: Ves (12) = 27

Ves (13) = 26: Ves (14) = 24

IF Ves (i) n = Ves (i)

Ves =

for i in range (14):

if Ves [i] n = Ves [i]

Pascal Algorithmic language

Var i, n: integer;

Ves: array of integer;

Ves: = 25; Ves: = 21;

Ves: = 23; Ves: = 28;

Ves: = 30; Ves: = 25;

Ves: = 31; Ves: = 28;

Ves: = 25; Ves: = 28;

Ves: = 30; Ves: = 27;

Ves: = 26; Ves: = 24;

for i: = 1 to 14 do

Celab Ves

nts for i from 1 to 14

if Ves [i] n: = Ves [i]

C ++

#include

using namespace std;

int Ves = (25, 21, 23, 28, 30, 25, 31, 28, 25, 28, 30, 27, 26, 24);

for (int i = 0; i if (Ves [i] cout return 0;

Answer:

The figure shows a diagram of the roads connecting cities A, B, C, D, E, E, F and K. On each road, you can only move in one direction, indicated by the arrow. How many different routes are there from city A to city K?

Answer:

Below in tabular form is a fragment of the database "Departure of long-distance trains":

DestinationTrain categoryTravel timeRailway station
Makhachkalafast39:25 Paveletsky
Makhachkalafast53:53 Kursk
Murmanskfast35:32 Leningradsky
Murmanskfast32:50 Leningradsky
Murmanskpassenger37:52 Leningradsky
Murmanskpassenger37:16 Leningradsky
Nazranpassenger40:23 Paveletsky
Nalchikfast34:55 Kazan
Neryungrifast125:41 Kazan
Neryungrifast125:41 Paveletsky
Nizhnevartovskfast52:33 Kazan
Nizhny Tagilbranded31:36 Yaroslavsky

How many records in a given fragment satisfy the condition

Answer:

Some number in binary notation is written as 1010110. Write this number in decimal notation.

Answer:

The executor Kvadrator has two teams, which are assigned numbers:

1.square

The first of them raises the number on the screen to the second power, the second subtracts from the number 1. Make an algorithm for obtaining the number 13 from the number 2, containing no more than 5 commands. In the answer, write down only the command numbers.

(For example, 22211 is the algorithm:

square

square,

which converts the number 1 to 16.)

If there are more than one such algorithms, then write down any of them.

Answer:

A 3 MB file is transferred over a connection in 60 seconds. Determine the size of the file (in Kbytes) that can be transferred over the same connection in 20 seconds. Please provide one number in your answer - the file size in Kbytes. Units of measurement do not need to be written.

Answer:

Some algorithm from one string of symbols gets a new string as follows. First, the length of the original character string is calculated; if it is odd, then the first character of the chain is removed, and if it is even, then the character T is added to the middle of the chain.In the resulting chain of characters, each letter is replaced by the letter following it in the Russian alphabet (A - to B, B - to C, etc.). and I - on A). The resulting chain is the result of the algorithm.

For example, if the original chain was LEG OPUDB, and if the original was a chain DREAM, then the result of the algorithm will be the chain ON.

Given a character string QTY... What chain of symbols will be obtained if the described algorithm is applied twice to this chain (i.e., apply the algorithm to this chain, and then apply the algorithm again to the result)? Russian alphabet: ABVGDEEZHZYKLMNOPRSTUFHTSCHSHSCHYEYUYA.

Answer:

File access rus.doc located on the server obr.org, carried out according to the protocol https... Fragments of the file address are coded with letters from A to G. Write down the sequence of these letters that encodes the address of the specified file on the Internet.

Answer:

The table lists the requests to the search server. For each request, its code is indicated - the corresponding letter from A to G. Arrange the request codes from left to right in descending order of the number of pages that the search engine will find for each request. To denote the logical operation "OR" in the query, the symbol | is used, and for the logical operation "AND" - &.

Answer:

The results of testing students in geography and computer science were entered into a spreadsheet. Here are the first lines of the resulting table:

ABCD
1 StudentSchoolGeographyInformatics
2 Lishtaev Evgeniy1 81 79
3 Sergey Budin2 63 90
4 Khristich Anna6 62 69
5 Ivanov Danila7 63 74
6 Glotova Anastasia4 50 66
7 Leshchenko Vladislav1 60 50

Column A contains the student's last name and first name; in column B - the student's school number; in columns C, D - points obtained, respectively, in geography and computer science. For each subject it was possible to score from 0 to 100 points. A total of 272 students were included in the spreadsheet. The order of entries in the table is arbitrary.

Complete the task.

Open the file with this spreadsheet (the exam organizers will tell you the location of the file). Based on the data in this table, answer two questions.

1. How many students in school No. 2 scored more points in computer science than in geography? Write the answer to this question in cell F3 of the table.

2. What percentage of the total number of participants were students who received more than 50 points in geography? Write your answer to one decimal place in cell F5 of the table. task19.xls

The solutions for the expanded answer tasks are not automatically checked.
The next page will ask you to test them yourself.

Choose ONE of the tasks below: 20.1 or 20.2.

Performer The robot is able to navigate a maze drawn on a plane divided into cells. There can be a wall between adjacent (on the sides) cells, through which the Robot cannot pass. The Robot has nine teams. Four commands are command commands:

up down left right

When any of these commands are executed, the Robot moves one cell, respectively: up and down ↓, left ←, right →. If the Robot receives the command to move through the wall, it will collapse. The Robot also has a command paint over, at which the cell in which the Robot is at the moment is painted over.

Four more commands are commands for checking conditions. These commands check if the path is clear for the Robot in each of the four possible directions:

top free bottom free left free right free

These commands can be used in conjunction with the condition "if" that looks like this:

if condition then

sequence of commands

Here condition- one of the commands for checking the condition. Sequence of commands Is one or more of any command-orders. For example, to move one cell to the right, if there is no wall on the right, and painting the cell, you can use the following algorithm:

if the right is free then

paint over

In one condition, you can use several commands for checking conditions using logical connectives and, or, not, For example:

if (right is free) and (not below free) then

To repeat a sequence of commands, you can use the loop "bye" which looks like this:

nc bye condition

sequence of commands

For example, to move to the right while possible, you can use the following algorithm:

nts so far on the right is free

Complete the task.

On an infinite field, there are two identical horizontal parallel walls, located one below the other and spaced from each other by more than 1 cell. The left edges of the walls are flush. The lengths of the walls are unknown. The Robot is in a cage located directly under the bottom wall. The figure shows one of the possible ways to position the walls and the Robot (the Robot is marked with the letter "P").

Write an algorithm for the Robot that fills in all the cells below the horizontal walls. The robot must paint only cells that meet this condition. For example, for the above picture, the Robot should paint over the following cells (see picture).

The final location of the Robot can be arbitrary. The algorithm must solve the problem for an arbitrary size of the field and any acceptable location of walls within a rectangular field. When executing the algorithm, the Robot should not collapse. The algorithm can be executed in the environment of a formal executor or written in a text editor. Save the algorithm in a text file.

20.2 Write a program that, in a sequence of natural numbers, determines the number of multiples of 3. The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a multiple of 3. The number of numbers does not exceed 100. The entered numbers do not exceed 300. The program should output one number - the number of multiples of 3.

In general, what are we talking about? ..
The last parameter allows you to select one of the search results - this is the first level of the hierarchy (Match Object). Groups, only if highlighted, are nested in each of these results - the second level of the hierarchy (Matches Collection). You all have full matches, because they can never be different. But even if you select a group using parentheses (capture occurs), you still cannot refer to it. In the template itself, you can refer to the group through the syntax \1 (exactly like that: via backslash), but that's not what you want. It has nothing to do with your task.

Search results can be as many as words in a sentence. But you can break each word, for example, into letters, and then in each search word there will be several selected letter-groups. Something like this. But why do you need this? The author of one function has solved how many problems!

Try this pattern (regex101 doesn't find anything, but VBScript does):

^.*(?=/[^/]*)$

Explanation. Within a line from the beginning ^ to end $ find a sequence of any characters .* before a single slash character set / and sequences, conversely, of any characters other than the slash [^ /] *. Anything in parentheses is a group (look ahead), read the manual.

Author function RegExpExtract () does not give the ability to refer to groups. What is in parentheses in the template is indeed a group, but the RegExp.Replace () method, which is not used in the author's function, provides the ability to work with such a group.

Implement your RegExpReplace (Text, Pattern, Replace) function, in the body of which insert the RegExp.Replace (Text, Replace) method.
The function will be no longer than the first. It's simple.
Text is the original text,
Replace - a string (using patterns of links like $ 1), which should be replaced in the original string Text with the search result by pattern Pattern.
In order to make it convenient to make replacements, it is advisable to find the whole line and highlight in it required groups.
In our case, like this:
(.*)/.*

Match 1
Full match0-9 `1/2/3 / pin `
Group 1.n / a`1/2/3 `
And now, to manipulate parts of the string, you need to call a new function with the given arguments. Let's say you need to add a number sign to the value of group 1, then it will look like this:
RegExpReplace ("1/2/3 / output"; "(. *) /.*"; "No. $ 1")
The returned result will be like this:
№1/2/3

But if you want to replace a substring or, even better, delete it completely in the original text, then like this:
RegExpReplace ("1/2/3 / output"; "(. *) /"; "")
The returned result will be like this (the result of searching for a pattern will be "1/2/3 /"):
vyv

You can refer to a group when manipulating strings (not in a template) using the syntax $1 (exactly like this: through the dollar sign).
If I understand you correctly.

If you do not need substring manipulation by substitution, then follow the rule:
write templates (reg. expression) so rigidly that only one thing is found (retrieved), or make several calls according to a more general template, but specify which result in order (Item parameter) should be returned. Combine the results of independent function calls, process, etc. By and large, you can operate on the search results as your groups (only without links like $).

Option

A text editor is a program designed for

  1. creating, editing and formatting text information;
  2. working with images in the process of creating game programs;
  3. management of PC resources when creating documents;
  4. automatic translation from symbolic languages ​​into machine codes;

2. The main functions of a text editor include:

  1. copying, moving, destroying and sorting text fragments;
  2. creation, editing, saving and printing of texts;
  3. strict adherence to spelling;
  4. automatic processing of information presented in text files.

3. The character entered from the keyboard when typing is displayed on the display screen in a position determined by:

  1. given coordinates;
  2. the position of the cursor;
  3. address;
  4. the position of the previous typed letter.

Cursor position message, indicated by

  1. in the status bar of a text editor;
  2. in the text editor menu;
  3. in a text editor window;
  4. on the taskbar.

5.Using a computer, text information can be:

  1. store, receive and process:
  2. store only;
  3. only receive;
  4. only handle.

6. What operation is not applied to text editing:

  1. printing text;
  2. deleting an incorrectly typed character in the text;
  3. inserting a missing character;
  4. replacement of an incorrectly typed character;

7. Copying a text fragment in a text editor primarily involves:

  1. specifying the position from which the object should be copied;
  2. selection of the copied fragment;
  3. selection of the corresponding menu item;
  4. opens a new text box.

8. The text typed in the test editor is stored on an external storage device:

  1. as a file;
  2. encoding tables;
  3. directory;
  4. directories.

9.With which icon can you start the Word editor?

10. What are the scroll keys for?

  1. To resize the document.
  2. To select menu items.
  3. To quickly move through the text.
  4. For screen decoration.

11. Given words and the location of the cursor in them. What words will be obtained from the data as a result of the fact that the keys were pressed:

12. What is the Delete key used for?

  1. To delete the character in front of the cursor.
  2. To go to the next paragraph.
  3. For retreat places.
  4. To save the text.
  5. To delete the character following the cursor.

13.What sequence of commands can be used to get the following type of inscription:

  1. Edit | Paste Special ...
  2. Format] Font ...
  3. Insert | Figure | WordArt ...
  4. Format | Style

Which of the following sequences of actions performs the movement of the block.

  • Select a block.
  • Copy it to clipboard.
  • Then move the cursor where needed
  • Paste it where you want.
  • Select a block.
  • Cut it to clipboard.
  • Then move the cursor where needed.
  • Insert block.

15. What is the Assistant for?

  1. To decorate the document window.
  2. For quick tips or help.
  3. To demonstrate the animation capabilities of Word.
  4. To insert animation into the text of the document.

Option 2

1. In the row "symbol" - ... - "string" - "text fragment" is missing:

1. "word";

2. "paragraph";

3. "page";

4. "text".

2. The BackSpace key is used to:

5.delete the character to the right of the cursor

6.delete the character to the left of the cursor

7.deleting the entire line where the cursor is located

8. moving to the next page of the document;

The cursor is

1. device for inputting text information;

2. key on the keyboard;

3. the smallest display element on the screen;

4. A label on the monitor screen indicating the position at which keyboard input will be displayed.

4. When typing, one word is separated from another:

1.point;

2. a space;

3. comma;

4. colon.

5. Editing text is:

1. the process of making changes to the existing text;

2. the procedure for saving text to disk as a text file;

3. the process of transferring textual information over a computer network;

4. a procedure for reading a previously created text from an external storage device.

6. In a text editor, when specifying page parameters, the following are set:

1. Typeface, size, style;

2. Indent, interval;

3. Fields, orientation;

4. Style, template.

7. The text editor menu bar is:

1. part of its interface, providing a transition to performing various operations on the text;

2. a subroutine that provides management of PC resources when creating a document;

3. a kind of "window" through which the test is viewed on the screen;

4. information about the current state of the text editor.

Hypertext is

1. structured text, in which transitions can be made by selected labels;

2. regular, but very large text;

Top related articles