background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул"

input logo icon
Video tags
|

Video tags

информатика
умскул информатика
подготовка к егэ
умскул егэ
с чего начать подготовку к егэ
виктория ланская
умскул
егэ информатика
умскул информатика егэ
вика ланская
виктория ланская умскул
python
информатика 11 класс
информатика 10 класс
егэ
программирование
подготовка к егэ по информатике
информатика егэ 2022
егэ 2022
егэ 2023
мастер-группа
решу егэ
информатика егэ 2023
все полезные библиотеки в python для егэ
библиотеки в python
викторияланская
егэинформатика
егэ2023
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
guys, hello everyone, today I want
00:00:02
to tell you a little about useful things for those
00:00:04
in python if you are interested in this video
00:00:06
then continue watching
00:00:13
in general we often get the question about whether it is possible to
00:00:16
use
00:00:18
nursery libraries like And if they are not
00:00:21
the main one and so on there are actually
00:00:23
built-in ones python libraries That
00:00:24
is, if you installed python, then these
00:00:26
libraries are definitely there. Therefore, there is
00:00:28
no escape from you and of course they can be
00:00:31
knitted, you even need to do this, well, let's
00:00:33
try to figure out which
00:00:35
ones don't exist first, I guess
00:00:37
I should introduce myself My name is Vika
00:00:39
all the time for 100 points True, it’s already the fifth
00:00:41
year, only 39,100 points, so on and
00:00:44
so forth there is a diploma program engineer
00:00:47
raboko worked as a back-end developer and
00:00:49
all the social networks you can pick up here there
00:00:52
is also a QR code great on my
00:00:54
telegram channel where the fart release
00:00:56
all sorts of questions just some news,
00:00:58
some posts, maybe the QR code is
00:01:01
broken, in this case, don’t
00:01:03
get upset and just
00:01:05
go to the link in
00:01:08
the description, you know where, there’s also a link
00:01:10
to my cart, you take
00:01:13
this Youtube channel so you don’t
00:01:15
miss anything By the way, most
00:01:16
likely this is the first video in 2023.
00:01:20
Congratulations to everyone then, they were waiting for the holiday. It
00:01:22
turns out that’s because it’s
00:01:25
always cool, the first video should probably be
00:01:27
especially funny in some way, but it’s unlikely that
00:01:30
this will happen, but oh well, in general, what
00:01:33
useful ones do we have for those In general,
00:01:34
there are a lot of libraries, if you try to
00:01:36
google it, you will see that there are
00:01:38
very, very many of them. I wanted to emphasize
00:01:41
those that we, in principle,
00:01:42
may need for the Unified State Exam. In principle, there may
00:01:44
be a few more that you and I may
00:01:47
need. Write in the
00:01:49
comments If you want to I told them too,
00:01:50
but I would basically do the
00:01:51
basic ones. These are the ones I usually use. I
00:01:57
probably also use Tortoise most often,
00:01:59
because here we can pick up a
00:02:01
library for combinatorics. A very
00:02:03
useful thing, incredibly useful, that’s
00:02:05
true, it’s just a Mast Hap for the sake of
00:02:07
it alone. switch to python then
00:02:13
I won’t say that it’s often useful
00:02:17
because I use idol more often, you need to know
00:02:19
how it works too, well, maf I
00:02:22
now rarely have to
00:02:23
use punkts as much as in
00:02:25
certain cases, strings Now I
00:02:27
don’t use them at all, but still it
00:02:29
can be useful Well, for me personally, it’s more convenient to
00:02:32
just choose letters Well, let
00:02:34
me try to show you something about
00:02:37
each one at least like this,
00:02:44
let’s start
00:02:47
sorting out our libraries, we’ll start with
00:02:50
you and I, perhaps On what principle I don’t even
00:02:52
know
00:02:54
with which one to start with, let's start with
00:02:56
staring because it's the simplest How can we
00:02:59
even pick it up
00:03:00
from the library? Usually I write like this. That is, where from the
00:03:05
library the string even gives me a hint.
00:03:07
I import everything that is there,
00:03:10
of course, it can be specific functions or
00:03:12
specific changes, at least something. one thing I’m
00:03:15
taking away is everything because it wo
00:03:17
n’t break the cat, but at the same time,
00:03:20
if you don’t need to rewrite anything,
00:03:21
replace it with an asterisk, we take everything right away so that it’s more
00:03:23
convenient to understand,
00:03:25
it’s not clear that we took the entire entire
00:03:27
library,
00:03:29
now you can use it But the question is
00:03:32
for sure And what kind of library is this in general,
00:03:34
how to use it and so on, I usually
00:03:36
press Control b and I get
00:03:40
exactly the same File library here,
00:03:42
all the information about it is a
00:03:44
lot of everything and, in principle, that’s exactly what
00:03:47
we have with you like this with a green
00:03:48
color, this is essentially the color of our
00:03:50
documentation, we can find out what is here, in
00:03:54
principle, this is a collection of cooling
00:03:57
constants. That is, this is just a collection,
00:03:59
so to speak, You and I have
00:04:01
some specific values, for example, we
00:04:04
can display white space and then we
00:04:06
will get all our
00:04:08
parallel symbols for example, we can
00:04:11
only display a skiller case, then we will
00:04:13
get with you only the lower letters How to
00:04:16
say uppercase letters in Russian
00:04:18
In short, you can only have numbers and so
00:04:20
on Let's try to make something out of
00:04:22
this Let's try, for example,
00:04:25
what is there, how to write it, and
00:04:28
let's try the skiller display By the way, when
00:04:30
you use the library, it starts to be
00:04:32
highlighted until this moment, it does
00:04:34
n’t seem to be highlighted, you can see I have
00:04:35
displayed all possible letters, in
00:04:38
principle, I can letters, I can letters only large ones,
00:04:40
only small ones, I can
00:04:42
only numbers only ten only
00:04:45
octal
00:04:46
punctuation In short, there’s a
00:04:48
lot here enough constants Here you are
00:04:51
So by the way, you can see right here
00:04:53
how they look, that’s cool
00:04:55
enough This is convenient
00:04:58
when, for example, you need to sort through
00:05:00
all the letters of the alphabet in the 24th task, but I
00:05:02
usually do hack work and I just go through the
00:05:05
keyboard
00:05:08
because they are all there, too, letters
00:05:11
like Yes, by the way. By the way, if you ca
00:05:13
n’t do this through Control, what else
00:05:16
can you do? You can simply write an
00:05:17
import string and there is a wonderful
00:05:20
opportunity in Python to use
00:05:22
paint, it displays some kind of documentation for us,
00:05:24
and in this case, if the
00:05:26
string library was imported, then I can
00:05:29
they're already displaying the documentation here, it'll be
00:05:31
like a shortened version here,
00:05:33
most of all there's still some incomprehensible code here,
00:05:35
just the same description, only
00:05:37
in principle it's contained in principle, so
00:05:38
you can do it for any library,
00:05:40
import Help and see what it does
00:05:42
in order to specifically use it
00:05:44
It’s better for you and me to also
00:05:47
write industrialstring import
00:05:50
because if we don’t write the line that
00:05:52
was before
00:05:54
Yes Varum string import asterisk if we do
00:06:00
n’t write this line then in such a
00:06:02
situation so that before that I can
00:06:04
just write questions and that’s it now in order for
00:06:07
me to output,
00:06:08
for example, this constant I need the
00:06:11
string string to have a point called
00:06:13
this specific world for us, like this.
00:06:17
It won’t work. But if I
00:06:20
comment on this once, it will already work. That’s the kind of
00:06:23
confusion. You can say, but I’m just
00:06:27
writing here. Print Of course yes it’s
00:06:30
clear what you’re thinking about from the speech, I usually
00:06:33
just write this and then use
00:06:35
what I need, some kind of paint, I
00:06:37
need this, and you can write an import string
00:06:40
exactly when you want to find out
00:06:42
information. That is, if you want to
00:06:44
call Help, we had it string with you
00:06:46
well, great, we
00:06:48
figured it out, that is, we just
00:06:49
need some constants further,
00:06:52
what else can we talk about with you?
00:06:53
Let's try to talk about the magician
00:06:56
because it is big enough. That
00:06:58
is, I will jump because big to
00:06:59
small big small let's go to
00:07:01
map let's go to import Map again I can
00:07:04
just press [music]
00:07:06
Control B and go or I can write
00:07:10
Help Move I will also get information
00:07:12
and there is a lot of stuff in Map Well, there's just a
00:07:16
lot of stuff, so I'll probably be there anyway. That
00:07:18
is, it will be on my mouth
00:07:21
You can read it more conveniently Here you can read How convenient for you
00:07:23
Here too, there’s really a lot of things to
00:07:26
look at
00:07:28
Firstly, we can again take away
00:07:30
some specific constants That is, for
00:07:32
example, if I need infinity
00:07:34
or the number Pi You can take it all away
00:07:36
How, again,
00:07:39
if we don’t write From and Pro Map import
00:07:44
asterisk then we’ll have to
00:07:46
call Map point like this, for example e Let’s
00:07:50
pick up perhaps
00:07:53
Here you are his family e for example, we want to watch it
00:07:56
and see it too We have it in this
00:07:59
library, but we’re unlikely to
00:08:00
need it for playing themes no less and
00:08:03
again, I usually write like this
00:08:06
and in this case I don’t have to write Map
00:08:10
dot I can immediately write pi this way it’s more convenient It
00:08:13
seems good great What else do
00:08:16
we have here there are a lot of all
00:08:18
sorts of gizmos that are connected with
00:08:21
sines There with rock tangents and so on In
00:08:24
principle, we don’t need the first thing
00:08:25
we need is SEO. I don’t know how to
00:08:28
say this, in general, everything is written here that
00:08:30
it does, it takes from you and me, they simply
00:08:32
find the nearest integer but which is
00:08:37
greater than our fractional ones, that is, conditionally
00:08:39
speaking For example, if I try to output
00:08:42
That is, it rounds the larger side
00:08:45
5.7, then it will output me a six, of course,
00:08:48
it rounded up And if, for
00:08:50
example, I try 5.3, then it will also
00:08:53
round up more sides, we will also get
00:08:55
a six. That is, it simply
00:08:56
rounds more sides and
00:08:59
we have the same thing for now, it acts
00:09:02
almost completely differently, it
00:09:04
rounds on the contrary to the smaller side,
00:09:06
in principle it works like int That is,
00:09:08
it rounds to the smaller
00:09:10
side, in principle, everything is said here that
00:09:12
even further there is a computer that is not very good for us
00:09:14
will be needed because it returns
00:09:16
only the number of options, the
00:09:18
library and tortoise will help you and me,
00:09:20
so for now let’s skip the cosines of
00:09:22
the distance, that is, there are a lot of
00:09:24
mathematical functions that will be
00:09:25
useful to you, but not computer science, there is an
00:09:30
interesting cool factorial, that is,
00:09:32
even a function that will calculate the Factor for
00:09:33
someone -then numbers Let's check the
00:09:36
factorial of the path That is, again, you don't
00:09:38
need to write What is the function that
00:09:39
calculates the factorial So she calculated everything herself
00:09:43
In general, I think it's cool for the time
00:09:46
that we have sorted out, that is, this is
00:09:48
how you can just go and figure out what
00:09:49
's cool look, there are two
00:09:52
interesting functions, I don’t remember, they
00:09:53
just belong to Python 3 9 at least
00:09:56
in my opinion but I could be wrong gsd what
00:10:00
is it Here we need to output some
00:10:01
two numbers Let’s not use prime numbers Let’s
00:10:04
write about 2 and 24
00:10:08
What is it GT creedes it was written there was a
00:10:11
translation of Green division. That is, it gives
00:10:15
us the greatest common divisor. That is, for
00:10:17
example, if I had 20-40 here, of
00:10:19
course you would have 20, that’s how it
00:10:21
happens, and that is, it’s also pretty
00:10:23
cool. No algorithms are needed.
00:10:25
write Euclideans and so on, and LSM is
00:10:28
also a cool little thing, for example This is
00:10:30
ours What is it It’s the other way around less common
00:10:34
what is it called, well, in short, the smallest common multiple,
00:10:36
that is, LSM the smallest
00:10:39
common multiple you see 2260 and 260 here in
00:10:45
the garden and, accordingly, you can
00:10:47
also find GD It’s quite convenient, what else
00:10:50
is there interesting here, in principle, I say a lot of things, a lot of cool things, all sorts of
00:10:55
logarithms exist. Probably you’re
00:10:58
a chance, that is, it also looks like there are
00:11:00
degrees, in principle, we don’t need you and me
00:11:02
because here we know. And where are the
00:11:04
degrees in Python, just two familiar,
00:11:07
there is a very interesting function Pro,
00:11:09
I really really like it, it’s just a
00:11:11
discovery for me What is prot
00:11:14
and look
00:11:18
at prod you need to give some kind of list at the input, as far as I
00:11:20
remember Let’s read
00:11:23
what he wants here,
00:11:26
that is, he should get some kind of
00:11:28
exactly
00:11:30
we will talk list That is, I forgot
00:11:34
the words in general sequence so to
00:11:36
speak So let’s write 13
00:11:38
15 17 for example, which it will return to us The
00:11:41
products of these numbers themselves That is, how
00:11:43
can we find, for example, the sum of some
00:11:45
numbers simply by using the sum function?
00:11:47
Well, let’s use the sums it returns
00:11:50
to us the sum of numbers, so if we
00:11:52
take just the same from the Map. We can still
00:11:54
take the pipeline and it will return the
00:11:55
product of the numbers, but it’s also quite
00:11:57
convenient. That is, you have, For example, a bunch of a bunch of
00:11:59
Clocks, you need to find the product and
00:12:02
instead of writing some kind of loop,
00:12:03
you can use just a wire
00:12:05
That’s true, I really like this
00:12:07
situation, it’s true that it’s quite convenient
00:12:08
to work, in principle, there’s a hint for yourself,
00:12:10
he says,
00:12:12
in short, multiply all the elements that
00:12:15
we give him, what else, so there’s
00:12:18
probably I won’t find it, I won’t remember in
00:12:22
general Yes, that’s all, that’s it and the very, very
00:12:24
interesting thing can, of course,
00:12:26
be excluded from extracting a square and so on, for
00:12:29
example from qrt it will return the nearest
00:12:31
square and so on, but it seems to me that what I
00:12:35
showed is that
00:12:36
we may need as much paint as possible on the Unified State Exam because
00:12:39
other things Well, for example, a work
00:12:41
can be simpler find just two acquaintances,
00:12:43
not multiply the power of two signs, that is,
00:12:47
with Map We also figured it out like this, let’s
00:12:51
continue to get acquainted with the
00:12:53
libraries, let’s move on to the next one. We’ll
00:12:55
probably move on to
00:12:58
the library and mercury. Let’s start with it, it
00:13:02
will also be quite massive, but it’s very
00:13:04
very interesting what it is we have a
00:13:06
library and a tortus Let's try to
00:13:08
pick up the
00:13:12
MAF so we don't need import and tortus anymore,
00:13:16
just let's see what it's about again,
00:13:19
just write Print just wrote it
00:13:24
will be simple It's just all the information There's a
00:13:27
lot of interesting stuff here, quite
00:13:28
interesting indeed, but probably the most
00:13:31
important what we have here is a module
00:13:33
that relates specifically to
00:13:37
minorics, that is, of course, there are others.
00:13:39
We have a
00:13:41
lot of opportunities here. You can read them, but specifically
00:13:46
related to the Unified State Examination. We have very cool ones, there are
00:13:49
three, in principle, a function because
00:13:52
cabination swifffreeplace we in principle,
00:13:54
it’s not such a necessary joke, the product is
00:13:57
cool, it’s a cool thing,
00:13:59
really, what is it with us
00:14:01
again?
00:14:03
Let me show you the
00:14:05
import protuse. By the way, you can just
00:14:08
write the necessary moment right away. Just
00:14:10
then press Alt Enter, then it will
00:14:13
be imported for you. Also periodically
00:14:15
you can do it like this. I propose to
00:14:18
do it this way.
00:14:19
In general, the product it creates for us is a
00:14:25
generator, that is, relatively speaking, this is not
00:14:28
a list. Therefore, if we want to get a
00:14:30
specific list of combinations, then
00:14:32
we will need to bring it all to a sheet,
00:14:34
so I’ll write it here, let’s use it
00:14:38
with you product
00:14:39
we must first write what we will
00:14:42
iterate over we will get
00:14:43
some combinations everywhere Let’s not know a b
00:14:45
c we iterate further we will indicate how many
00:14:48
symbolic legs are confused here Where to repeat
00:14:51
where p to write but again there are hints
00:14:53
that in the product we write repeat a in
00:14:56
for the rest we write R, which means how many
00:15:01
literally speaking values ​​I will have or
00:15:03
how many symbolic ones. Or for example, if we
00:15:05
go through the clock, then we will also
00:15:07
get new combinations and
00:15:09
from how many symbols if we try with
00:15:11
you to run it like this, then we will get
00:15:13
some then the nonsense of the heels we will get a generator, we
00:15:15
need to bring everything to the list so that we can
00:15:17
get it. You can see exactly the specific value,
00:15:20
we got all possible
00:15:22
combinations of the letters a b c by 2, that is, we
00:15:26
specifically indicated 2, so we took under 8,
00:15:29
showed for example, by 3, I got all
00:15:31
possible combinations by 3 and As you can see, the
00:15:33
funny thing here is that, for example, we
00:15:36
print repetitions here, that is,
00:15:38
each letter is taken, it can be repeated
00:15:40
any number of times. These are the
00:15:42
combinations you and I can get, this is done by the
00:15:44
product. If you want to go through, for example,
00:15:47
for the eighth task, it’s a cycle through
00:15:49
All these combinations can be done
00:15:50
simply, for
00:15:54
example, A B C
00:15:57
A B C
00:16:01
rebite re and
00:16:04
equal Dron and just Let's print oh
00:16:09
so Let's try to output As you can see,
00:16:12
I also get all possible combinations,
00:16:13
but I already have them each separately, it is
00:16:15
also displayed a normal topic here
00:16:17
Probably it is important to say that note that
00:16:19
if I wrote it in the order ABC, then
00:16:21
they will also be printed in that order,
00:16:22
that is, First with the letter and
00:16:24
then I will with the letter b then with the letter
00:16:27
That’s also quite a cool thing
00:16:29
of paint for the eighth tasks When we need
00:16:31
combinators, we need to select words if
00:16:33
I was here, for example, not some kind of
00:16:35
string, but just some numbers, in
00:16:38
principle, nothing would have worked,
00:16:40
I had here there would have been a list of numbers, I
00:16:43
got exactly combinations of these numbers,
00:16:46
that is, look at combinations of three
00:16:47
ones here, 2 ones and a two here
00:16:50
there may not necessarily be just strings, there
00:16:52
may be lists of anything, that
00:16:54
is, it simply takes from something and
00:16:56
combines these elements and lines and
00:16:59
lines takes combined
00:17:00
elements from a list and so on. We
00:17:02
have discussed this about that is, promatations are
00:17:04
also useful the thing only here no longer
00:17:06
repeats it is necessary to write
00:17:08
and here we also get combinations in the same way,
00:17:11
maybe someone is afraid to go through
00:17:12
earlier principle Nick is not there but only here
00:17:15
The trick is that there are no repetitions That is,
00:17:17
here if I have a 1 written once,
00:17:19
then it will be in I’m
00:17:21
repeated everywhere only once Let’s
00:17:23
take 2 each That is, I do
00:17:26
n’t accidentally double any symbol here, that
00:17:29
is, if there is only one then I take it either
00:17:30
once or don’t take it at all, these are the
00:17:33
combinations you and I will get, this is also
00:17:34
very important but note that there are both 1
00:17:37
2 and 2 1, that is, we are here checking all the
00:17:39
options by location, that is,
00:17:41
here it is very important for you and me,
00:17:45
that is, the position is important to us here, we are
00:17:47
looking with you
00:17:48
[music]
00:17:49
two lists but they are in different positions
00:17:52
our element is located, which means these are two
00:17:54
different lists,
00:17:55
you can do permutations, this is important
00:17:57
when you and I have a task where each
00:17:59
letter or each number is repeated exactly
00:18:01
once, as with a letter, again, a b c
00:18:06
But it’s important if you write some letter
00:18:09
twice, that means you will, in
00:18:12
principle, have the option When it is
00:18:13
repeated twice That is, how many
00:18:15
times is indicated here, so many times it can
00:18:17
occur or may not occur at all
00:18:19
That is, this is where
00:18:20
combinations of these symbols are taken, which are no
00:18:22
new ones are added,
00:18:25
2 of those that are found here are taken This is
00:18:27
the first one and we also have
00:18:29
combinations. What does it do? It also
00:18:32
returns a combination, but here it’s already a
00:18:34
unique combination, then here it does
00:18:36
n’t look at the location, that is, for
00:18:38
example, A B and Ba, it will be the same
00:18:41
on the combination itself. That is, here it is
00:18:43
looks like
00:18:45
what values ​​are in the list, that is,
00:18:48
uniqueness in terms of values, but the
00:18:50
order doesn’t seem to matter. That is,
00:18:54
the order here is not important, relatively speaking, that is, it’s
00:18:56
as if we have such an order here,
00:18:58
this is the same thing, but when we
00:19:01
use it with you permotations there, as
00:19:03
if the order has some meaning.
00:19:04
You see, that is, we
00:19:06
only get 12 13
00:19:08
2131 here, we missed it because it’s
00:19:10
essentially the same thing, it’s useful when you
00:19:13
need, for example, just combinations
00:19:14
to get
00:19:15
[music]
00:19:17
and not some words and so on In general, there
00:19:21
is also a useful thing, very greedy,
00:19:23
I told you very briefly because
00:19:25
you can sit on this for a long time and how to
00:19:27
use it, but you most often say
00:19:28
it’s better just to just brute force it in a
00:19:31
loop, for example, check every
00:19:33
time for some condition this and If
00:19:37
it fits, then plus one, it’s very important that
00:19:39
we have exactly a tuple returned here. That
00:19:41
is, if you want, for example, Let’s
00:19:43
run So that you don’t have a list here,
00:19:46
as if I’m very cool, I’ll call it a list
00:19:47
so as not to frighten you too much. If you
00:19:49
want everything here - there was a line,
00:19:51
then you will need to glue this together with the help of John. This is how
00:19:55
mercury works with you and me, three main things,
00:19:57
this is what you and I have
00:20:01
combinations
00:20:03
permotations product
00:20:04
product here you and I have repetitions
00:20:09
without repetitions at again different
00:20:13
locations we let's take into account Okay and
00:20:16
cabinations it's just a combination without
00:20:18
taking into account the importance of repetitions without the importance of
00:20:21
location somehow
00:20:23
So let's Next we've
00:20:26
sorted it out for you And the tortus that remains
00:20:28
remains grated and
00:20:30
fanctus I'll probably tell you about them using a
00:20:34
code example let me find it somewhere
00:20:36
I left it somewhere for myself, let's
00:20:38
start with you and I, probably with a
00:20:40
simpler joke about what it is,
00:20:46
we have a pretty funny
00:20:50
library like that, there's also a lot of
00:20:53
interesting stuff there, but we don't need that much of
00:20:56
it, in principle, we need it from it
00:20:58
there will be only one such decorator and that’s it
00:21:01
[music]
00:21:03
that is, again, we import if
00:21:05
we go over. Well, it would be best to just have a
00:21:09
bunch of everything and, in principle, I don’t see
00:21:12
any
00:21:16
point in using this on the Unified State Exam, you can, of
00:21:19
course, read it to find out what it is why, and
00:21:21
so on I don’t see much point
00:21:23
except for one thing: the cache can be used, in
00:21:26
principle, the cache can be simple You
00:21:27
can use the cache lesson, why is this again, we
00:21:30
can find it, read the information about it, the
00:21:38
redux is here with you Now we’ll find the
00:21:41
heels, so it’s more convenient to call Help there there
00:21:43
won’t be any extra stupid words, but
00:21:45
here we have too many, that’s what
00:21:48
Low cash is. In short, it
00:21:52
caches some elements for you and I. That
00:21:55
is, if we call some function and
00:21:56
get a value, then it these values
00:21:59
will be recalculated every time That
00:22:01
is, for example, you constantly call
00:22:03
the function from 5 constantly and he will simply
00:22:05
remember this value and will not
00:22:07
call the function again every time A friend of you
00:22:09
to find out what In the end the answer is five
00:22:12
what from three In the end the answer is
00:22:13
five you are on you spend, for example, two
00:22:16
minutes there, it starts this cycle, it will
00:22:18
bite this value and accordingly it
00:22:19
will automatically give you that is,
00:22:21
the cache is like an automatic output of
00:22:24
values ​​because it is already immediately
00:22:25
saved in the list, as you know, for
00:22:27
example, for example, it constantly
00:22:29
gives you the same problem in mathematics instead in
00:22:32
order to solve it again every time, you will
00:22:33
simply learn the answer and
00:22:35
return it because, in principle, the problem is
00:22:37
exactly like this. This is what he does, if he
00:22:39
sees that the task is the same And it was
00:22:42
often performed, then he, as if in a smart way,
00:22:44
does everything there And remembers the meaning Now,
00:22:47
let’s say it’s not very convenient here,
00:22:51
so let’s write with you. So let’s
00:22:59
try to read with you here
00:23:01
because there’s quite a lot of
00:23:03
interesting stuff. Look, first of all, here you can
00:23:05
specify the maximum size and so on, but
00:23:08
in principle it doesn’t matter. What is maxsize
00:23:10
if we indicate it to us? oru futures that
00:23:15
is, a
00:23:16
bonus is such a sheet resnet That is, this is
00:23:20
what was just most recently
00:23:22
used, that is, in short, I will now
00:23:24
translate into Russian That is, it
00:23:26
remembers exactly those values, that is, the
00:23:28
top 128 values
00:23:31
that are called
00:23:33
That is, for example, if we have only
00:23:35
the function was called at 200 tone value will
00:23:38
not remember everything, but only 128 those that were
00:23:40
executed more often. This is what it does. If
00:23:43
you and I tell us, it turns out that it
00:23:45
will remember all the values ​​and no matter how there
00:23:47
is a trick here, the trick will not
00:23:50
work because the trick is that that he
00:23:51
himself understands what values
00:23:54
you work on most often like this, I’m
00:23:59
telling you about this in short, in short, how can we all work with this?
00:24:01
Let’s better figure this out. It’s
00:24:04
actually a useful thing. Well, as you can see, it
00:24:07
only works on functions because in
00:24:08
Kashira the value is the function more In addition,
00:24:10
this is useful today for recursive ones
00:24:12
because most often the same
00:24:14
values ​​are constantly remembered like this
00:24:17
From, in principle, we do
00:24:21
n’t need anything else Spanishctus Do we need this
00:24:24
function in general in life, in principle, for
00:24:25
some codes 1921 means it will be
00:24:28
useful And I’ll show you on 16 tasks The task is
00:24:32
more like a stat city type problem
00:24:35
Here's a problem like this Here's a problem if we
00:24:38
just try to complete it with you,
00:24:40
then the code will be executed for a certain
00:24:43
amount of time Well, it's completed after
00:24:44
all, if we want to speed up
00:24:46
the code with you, then we just write this, which means
00:24:49
an annotation In short, and we’re writing here, I’m lying to the
00:24:52
porridge, again, I usually don’t even
00:24:56
indicate anything. That is, I don’t say
00:24:59
max size and so on, but you can if
00:25:01
you don’t have 25 there, for example, as much as a million from
00:25:06
1000, then you can indicate that
00:25:08
Max from NAN That is, this also sometimes
00:25:10
speeds up the code, why because otherwise you
00:25:13
only have 128 values ​​stored, because of this, the
00:25:16
others will be
00:25:17
recalculated, but if it
00:25:19
works really slowly for you, you can
00:25:21
also indicate the maxi to us, then all
00:25:23
the values ​​will be based on the latitude, it will
00:25:25
work even faster, but how then there
00:25:30
may be problems with memory in some situations,
00:25:31
see the lesson is written on a function, you need to
00:25:34
define it.
00:25:35
The trick is that, in principle, I
00:25:37
wrote a hand here only on F and it already
00:25:41
works quite quickly, but in principle
00:25:43
it is advisable, of course, to write both on and on G
00:25:46
Well, so that It’s as if the value
00:25:49
was cached here and the value
00:25:50
was cached here, but it’s possible somewhere in one
00:25:53
case sometimes and this helps you and me to
00:25:55
speed up the code, if it helps in the
00:25:58
sixteenth task Or, for example, another
00:26:00
task where there is a function Especially where
00:26:02
recursive ones speed up the code because it is
00:26:04
wide this value, that is, it does not
00:26:05
calculate it anew every time, and a very
00:26:07
important point is that without using it on
00:26:10
all functions there, it is unlikely that it will greatly
00:26:12
speed up the code on recursive ones Yes, on
00:26:14
all of them, and some people
00:26:17
just stick it in even where there is no function
00:26:19
Well, no, this not a magic pill to
00:26:22
speed up the code no it’s just
00:26:23
caching the exact value of some kind of it most
00:26:27
often they need it for recursive ones so
00:26:29
panctus figured it out left it erased
00:26:32
this year we have task number six a
00:26:33
new type has appeared for the turtle I usually
00:26:37
solve it through Idol to be honest Well at least
00:26:40
My idol lags and suffers on the Mac
00:26:43
Now I’m on Windows, but when I’m at home I
00:26:45
usually solve T-shirts So, accordingly,
00:26:47
problems arise for me and then I
00:26:51
can open the library. I’ll tell you right away
00:26:53
that I haven’t worked with it much in
00:26:56
my life...
00:26:58
then at school we made presentations, they
00:27:02
played turtle. That’s why let
00:27:04
me, that’s why I myself feel like I might actually forget
00:27:08
some things, but all the
00:27:10
information is there. If it hadn’t happened, of course,
00:27:13
I would have trained there and so
00:27:15
on, but I now understand that All
00:27:17
the documentation for this library is there and
00:27:19
therefore there’s no need to worry too much, there’s a
00:27:23
lot of information about this module, and basically if you
00:27:26
read it all you’ll go crazy,
00:27:28
God forbid, but there’s even a lot of example
00:27:31
code here it’s
00:27:33
downright exhaustive If you
00:27:35
read this, you’ll probably know everything in the world
00:27:37
about this unfortunate
00:27:38
turtle. That is, there’s really a lot of
00:27:40
information. I mean, I have a real example
00:27:43
of code,
00:27:45
I’ll probably save your time and just
00:27:48
take the code that I gave to the masters.
00:27:52
Maybe I didn’t give it, I gave it
00:27:55
just in the Master group. That is, in my
00:27:57
course.
00:27:58
I suggest you just go through it and
00:28:01
figure out what’s most important here.
00:28:02
Again, it’s
00:28:07
better, by the way, it’s
00:28:09
considered good form to make some indents after the names of libraries. That’s
00:28:13
not considered very good it’s beautiful to write when
00:28:15
it’s all code, but I most often
00:28:16
do this because I want to fit
00:28:19
as many lines of code as possible,
00:28:21
it’s advisable to do some of course.
00:28:24
When I write on my own, not for someone else,
00:28:26
I really did a lot of indentation
00:28:27
to make the code easier to read. But for you I I
00:28:30
usually don’t do this Why Because
00:28:33
as I said
00:28:36
So that most of the code fits
00:28:39
Although it happens differently in general, what we have
00:28:42
here is interesting Well, look,
00:28:44
firstly, you and I have such an
00:28:46
opportunity sleep, what is speed?
00:28:48
That is, we have with you if we launch
00:28:51
this joke
00:28:53
By the way, for me it’s very working Yes, I don’t
00:28:56
know the law at all, to be honest Because
00:29:02
Let’s see,
00:29:07
I don’t know the law a little
00:29:11
Well, okay, let it be
00:29:13
[music]
00:29:18
okay,
00:29:19
apparently I had it for some Krylov building
00:29:21
In short, it’s like
00:29:23
we will have a turtle move quickly
00:29:25
because otherwise it can move very
00:29:27
slowly if you need to draw a lot of points.
00:29:29
She will move very slowly
00:29:31
here you can order
00:29:33
just the same speed of movement if
00:29:35
you don’t believe it, then move on Oh, by the way,
00:29:37
there’s no real information about her, but I I think
00:29:40
somewhere it was possible, in any case,
00:29:41
to find information about this, well
00:29:44
further LED is what you and I have, just like
00:29:47
that, our unit Turtle
00:29:50
to the left, here's further Forward, this is
00:29:54
just a straight movement for us, is there a
00:29:56
movement to the left?
00:29:59
to the right That is, I said
00:30:02
moving to the left is not true, this is a turn
00:30:04
to the left, we indicate what degree we
00:30:07
will turn to lie, we indicate How many
00:30:09
degrees we are right this way or that Forward
00:30:12
is just moving forward That's all
00:30:14
here, too, as if I think plus minus
00:30:16
Clearly In principle, there are conditions what
00:30:18
is Pen we have in this
00:30:20
problem, lower the tail, all this
00:30:22
is essentially lowering the tail, that is,
00:30:23
So we begin
00:30:25
to draw further Well, here is a repeat, a repeat,
00:30:27
obviously this is just a regular cycle, I’m
00:30:29
repeating here, just a straight movement, a
00:30:31
90-degree turn movement straight, turn
00:30:33
90 degrees, Pen Up is just to
00:30:36
raise the tail. That is, he already
00:30:38
stops drawing here, that is, here he
00:30:40
will draw and all his movements, all
00:30:42
his movements will be
00:30:44
recorded right here with you and me already
00:30:46
nested loop why is this done? And here
00:30:49
I’m just drawing
00:30:51
[music] the
00:30:52
cells. Because this way I’ll just
00:30:55
draw some kind of line and it’s
00:30:57
not clear to anyone to draw the cells,
00:30:59
usually just take a
00:31:02
gap of some X’s and just
00:31:04
put dots set post This is our
00:31:06
staging, this is setting the position set
00:31:10
post we change the position and we
00:31:12
move to Which specific X to
00:31:14
specific Y and DOT this is just the
00:31:16
same for us Everything put an end to Well and Yes, this is so that
00:31:18
as far as we understand, the year does not fly away
00:31:21
right away so that it you and I have a little
00:31:23
left, we could look at it
00:31:25
differently, how to do it and that’s it And
00:31:27
goodbye That is, these are the jokes,
00:31:29
that is, this is the most important thing,
00:31:32
probably also important That’s exactly what I
00:31:34
could do myself Forget this is a set post That
00:31:36
is this is exactly what position I should
00:31:37
take. That is, he takes and moves my
00:31:40
turtle, that’s exactly setting a
00:31:43
point with a course too. Of course, this code did
00:31:46
n’t turn out very well.
00:31:48
Well, okay, I just don’t know where it came from, but I
00:31:51
stole it
00:31:54
somewhere I had
00:31:56
this
00:32:03
Yeah, it’s just going too far ahead,
00:32:06
let’s not multiply us by 40,
00:32:12
now I’ll try to fix the code. If you
00:32:15
want to see what it all looks like. And it
00:32:17
seems to me that there is a suspicion that
00:32:19
you are interested in what it looks like. Let
00:32:21
’s not click on 40. 40 turned out to be
00:32:22
too much, it just went
00:32:25
beyond the limits and that’s it No, it’s still too much
00:32:29
Let’s not multiply,
00:32:32
why am I multiplying because otherwise it
00:32:35
turns out that it’s too small, I
00:32:38
kind of increase the scale in the same way as
00:32:40
we did with you and in the idol here now I’ll
00:32:42
show you a picture, look
00:32:47
now I’ll show you,
00:32:50
let’s restart it, that
00:32:54
is, a window like this pops up in this
00:32:56
grate and at first he drew for us, he just
00:32:58
went straight to the right and then he starts
00:33:01
drawing exactly on the square he drew,
00:33:04
then putting dots is almost
00:33:07
invisible because, again, I’m too I
00:33:08
put a small one Let's put it at 4
00:33:10
then they will most likely be
00:33:12
very large, but nevertheless they are
00:33:14
visible. You see here he
00:33:17
puts dots using the Dot command, everything
00:33:21
in principle, this is all that concerned this
00:33:24
library, again, what exactly is
00:33:25
needed for the Unified State Exam for the Unified State Exam you need to go from right to left
00:33:27
down,
00:33:28
raise your tail, lower your tail and put
00:33:31
just a full stop, you don’t
00:33:33
need anything else, and there’s a lot of
00:33:35
interesting stuff there you can do that’s
00:33:37
just incredible a little bit, of course I
00:33:38
stretched it out, to be honest, the video But
00:33:40
again I wanted to go through
00:33:43
documentation and all sorts of cool things
00:33:45
to show something with an example, so this is how it
00:33:47
turned out I hope you
00:33:49
liked the video, in any case, it seems to me
00:33:51
that these things are quite cool
00:33:53
and of course you should use them. I would especially
00:33:56
highlight the mouth because it’s
00:33:58
just an import, to be honest again,
00:34:00
Perhaps it was not completely clear, you
00:34:03
need to do all this yourself from experience
00:34:06
if you want me to record a separate video about the
00:34:08
eighth sensor about this ace
00:34:10
Because I don’t remember if it’s on my
00:34:12
channel then Write in the comments Or for
00:34:14
example, you want if so that I show each
00:34:16
library on a specific task
00:34:17
and so on, also write in
00:34:19
principle, I can implement this, or if there are
00:34:21
any other libraries you want
00:34:22
me to review, in general, this is the
00:34:25
whole situation; you also take away useful
00:34:28
files from my description because,
00:34:30
again perhaps you still do
00:34:31
n’t know python at all, that is,
00:34:33
again, I also have a single concrete
00:34:35
Roller, which is useful in the description You can
00:34:38
choose also there are code templates
00:34:41
Just for solving all these problems of
00:34:42
the template This is bad, but at least for a start
00:34:44
familiarize yourself with what the approximate
00:34:45
principle of the solution is, in principle, it’s normal Well, I
00:34:48
’m also waiting for you in my wonderful
00:34:49
Telegram channel. There you can also
00:34:52
pick up all these panics in the pin, they
00:34:54
are there, if the link doesn’t work, the qr code,
00:34:56
then again, pick it up in the description, I’m glad, happy
00:35:00
holidays to everyone, not very good
00:35:02
holiday videos, I’m
00:35:04
just recording it before the New Year, so I hope
00:35:06
that your holiday was wonderful,
00:35:08
cool In general, see you Bye bye everyone

Description:

Забирай файл по основам проги: В моем Telegram-канале: https://t.me/+Gc1uSU2vXJ42MTli В группе ВК: https://bit.ly/3Z2ooDv Занятие проводит преподаватель информатики в онлайн-школе Умскул -- Виктория Ланская: - Готовит к ЕГЭ по информатике с 2018 года - Сдала информатику на 100 баллов - Выпустила 39 стобалльников, и 662 ученика сдали на 90+ - Выпускница КФУ ИТИС по направлению программная инженерия - Django-разработчик Больше бесплатной теории и практики ЕГЭ ↓ - Не забудь подписаться на этот канал и включить колокольчик! - Еженедельные материалы для ЕГЭ 2023 ВКонтакте: https://vk.cc/cdVOqf - Канал в Telegram: https://t.me/infa_vikusya Отзывы учеников: https://vk.com/topic-137331920_35045384 Нужна консультация? Звони, мы поможем: 8 (800) 444 37 50. Звонок бесплатный из любой точки РФ.

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Все полезные библиотеки в Python для ЕГЭ | Информатика ЕГЭ 2023 | Умскул"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.