Загрузка...

Relational or Comparison Operator in Python || Hindi || Lesson 16 || Python For Beginners ||

In This video you will understand relational or comparison operators in python.

0:00 Intro
0:26 Relational operators list and example
1:08 confusion with double equal and single equal
1:26 comparison example

Welcome, Wisdomers. In today’s session, we will explore the fundamental concept of Relational Operators in Python. These operators serve as the cornerstone of programming logic, enabling your code to make decisions and evaluate conditions. Gaining a thorough understanding of these operators is needed.
Take a look at relational operators. Let’s focus on our first relational operator: the Equal To operator. To use this in Python, we use the double equals symbol (==). For example, when we write x == y, as shown in the code. Python compares the values held by both variables. If they are same, the system returns True; otherwise, it returns False.
One point I must emphasize—and it is very important—the result of this operation is always a Boolean type. Whether it is True or False, it is always a Boolean. so z = True. Finally, be careful not to confuse the double equals (==), which is our comparison tool, with the single equals (=), which is used only for assigning values to variables. One checks a condition, while the other sets a value.
we understand the remaining comparison or relational operators with examples.
Take a look at the code
x not equal y will result in true because 5 and 7 are not equal.
x greater than z will result in true because 5 greater than 4
x less than z will result in false because 5 less than 4 is wrong
x greater than or equal to k result in true because 5 equal to 5
z less than or equal to k result in true because 4 less than 5

visit our learning agent at www.wisdomers.in for quizzes and projects

Видео Relational or Comparison Operator in Python || Hindi || Lesson 16 || Python For Beginners || канала Wisdomers - Placements & Programming Hindi
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять