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

Download "Уроки Python: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5"

input logo icon
Video tags
|

Video tags

python для начинающих
python
программирование на python
letpy
питон
python уроки для начинающих
программирование для начинающих
программирование на питоне
python обучение
уроки python для начинающих
программирование python
уроки python
Использование операторов сравнения
бесплатные курсы
списки python
пайтон
основы программирования
информационные технологии
операторы сравнения
булевский тип данных
условные операторы
оператор if
ооп python
циклы в python
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
the simplest programs in python cannot be
00:00:03
executed linearly,
00:00:04
that is, not a single line of the program
00:00:06
will be skipped and all lines will be
00:00:08
executed one after another; for example, there
00:00:11
could be a program that asks for the
00:00:13
name and age of the user and then
00:00:16
greets him,
00:00:17
well, that is, this is a really simple
00:00:19
program in reality Of course, not all
00:00:22
programs are so simple, for example, you may
00:00:25
need a different greeting for
00:00:27
users of different ages in
00:00:30
order to execute different lines of the program
00:00:32
for different conditions in Python there is such a
00:00:35
thing as a conditional operator in the general form of
00:00:38
its use it looks like this, first
00:00:41
you need to write a keyword then
00:00:43
the conditions that we want check
00:00:45
and at the end of the line there should be: if
00:00:49
you put a colon in the wrong place
00:00:51
it will be considered an error and such a
00:00:54
program will not even run so
00:00:56
be careful
00:00:58
the code that should be executed under this
00:01:00
condition must be written hundred stepped in
00:01:02
4 spaces in general indented and this is very
00:01:06
important part of python and it is by the ledges that
00:01:08
python understands how the
00:01:11
lines of the program will be executed, that is, if you write it
00:01:14
like this, both of these lines will be executed only
00:01:16
if the condition is met, but
00:01:18
if you write it like this, this line
00:01:21
will always be executed, regardless
00:01:23
of whether the conditional operator worked or
00:01:26
not, okay in this in the equation there is only
00:01:29
one cat left in the poke and this is the condition
00:01:32
in order to check the conditions in
00:01:34
Python there are special
00:01:36
comparison operators and they work almost the
00:01:38
same as arithmetic operators, that
00:01:41
is, there is a left operand and a
00:01:43
right operand and as a result of the operation of
00:01:45
the operator a certain result will be obtained
00:01:47
and if, for example, the addition operator will return the
00:01:50
sum as a result of the work, then the
00:01:52
comparison operator will return more than true
00:01:54
if the left operand is greater than the right one and false
00:01:57
in any other case is
00:01:59
true and false is the value of a special
00:02:02
logical or Gul data type,
00:02:05
this type has only two possible values
00:02:07
true and false
00:02:09
and the type is named after the
00:02:11
English mathematics and logic of George
00:02:13
Boole in general, the code under the conditional operator
00:02:16
will be executed only when the condition
00:02:19
is true and I will leave a link to all
00:02:21
comparison operators in the description. There is another
00:02:25
important point in all these matters with
00:02:27
comparisons and Boolean types - this is the
00:02:30
conversion of other types to the logical
00:02:33
data type if, for example, you convert
00:02:35
an integer to a logical type, then 0 will be false
00:02:39
and any other value will be true, if you
00:02:42
perform the same transformation with a
00:02:44
string, then any non-empty string will be
00:02:46
true
00:02:47
and an empty string will be false. This representation of
00:02:50
other data types makes it possible to
00:02:52
write simpler and more concise code,
00:02:55
for example, if the user has nothing will not
00:02:57
enter here there are three ways
00:02:59
to check this, the first is incorrect, this is to
00:03:02
get the length of the entered string and
00:03:05
compare it with zero, the second is the same
00:03:07
thing, compare the entered string with an empty
00:03:10
string, in technical terms, both of these
00:03:13
methods work, but they look too
00:03:15
crooked for such a cool language as
00:03:17
python in in general 3 and the correct way is to
00:03:20
simply write the name of the variable in the conditions
00:03:23
and if the user enters at least something the
00:03:25
condition will work because it is not an empty
00:03:28
string, it is true. Please note that you do
00:03:33
not need to force a variable conversion to a Boolean type in a conditional
00:03:36
operator, such a conversion will be
00:03:38
done automatically, of course, if
00:03:41
necessary compare the length of a string with a
00:03:43
certain number or the string itself
00:03:45
needs to be compared with some value, there is
00:03:47
nothing left other than the first and second methods
00:03:51
and remember that practice when learning
00:03:54
programming is very important, you can spend
00:03:56
hours watching training videos or
00:03:59
reading books, but if you don’t write code,
00:04:01
it’s a pipe, however It’s worth trying
00:04:04
to write at least one program, and
00:04:06
beginners usually have many
00:04:08
questions about how to install python and the
00:04:11
development environment, whether
00:04:13
the program is working correctly, where the error occurred, and how
00:04:16
to understand the interpreter’s scary messages
00:04:19
in general, so that the first steps in this
00:04:21
difficult task are simple and
00:04:23
effective, we have developed our own
00:04:26
unique learning environment for beginners
00:04:29
for years pie dot com we give theory
00:04:31
in small portions and to consolidate the
00:04:33
acquired knowledge you will have to write
00:04:36
programs, these programs are checked by our
00:04:39
specially trained robot, he also
00:04:41
points out errors and makes tips
00:04:43
for correcting them,
00:04:44
that is, you get feedback
00:04:47
almost instantly
00:04:48
install nothing no need, everything
00:04:51
works directly from the browser and the programs are
00:04:53
stored in the cloud so you can
00:04:55
study at any time and anywhere,
00:04:58
the main thing is that you have the Internet, try
00:05:01
this is a great way to start
00:05:03
programming, the
00:05:04
link will be in the description and by the way, if you
00:05:08
leave a comment under this video you
00:05:10
will be able to watch the work of the conditional
00:05:13
operator, if the comment is
00:05:15
short it will be displayed in full, but
00:05:18
if the comment is long,
00:05:20
only part of it will be displayed
00:05:22
and at the bottom there will be a read more button
00:05:25
that will open it in its entirety. Of
00:05:28
course, I haven’t seen the YouTube source code, but
00:05:30
I bet that this was done
00:05:32
using the conditional operator and checks
00:05:35
for a certain string length

Description:

Программирование на Python для начинающих: Зачем нужен условный оператор ветвления if. Использование операторов сравнения. Зачем нужны отступы при использовании условного оператора. Булевский тип данных. Какие строки и числа являются истиной, а какие ложью. Список операторов сравнения https://letpy.com/handbook/comparison-operators/ 🐍 Уроки по Python на LETPY, бесплатный тестовый период https://letpy.com/

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: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5" 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: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5" 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: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5" 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: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5" 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: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5"?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: Условный оператор if в Python. Операторы сравнения. Булевский тип данных. #5"?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.