+ 3

What does that signs mean?

halo I don't get this part of the module.please elaborate this portion. and also I wanted to know about the meaning of these signs '<' and '>'

24th Mar 2018, 6:14 PM
Dharti Bardapurkar
Dharti Bardapurkar - avatar
5 odpowiedzi
+ 4
< means left side is less then the right side. for example: 1<3 , 2<4, 5<6, 7<8 > means left side is greater then the right side. for example: 3>1, 4>2, 5>1, 7>4 Those are all used in if statements as True and false. for example. if(4>7) print("True") else print("False") in this case False will be printed because 4>7 is false , then the else command block is executed. if we were to write if(4<7) print("True") else print("False") we will get True because 4 is less then 7 so the statement is true and the if statement block will be executed.
24th Mar 2018, 6:23 PM
Tomer Sim
Tomer Sim - avatar
+ 4
== Is used to check is something equals to something. for example: if(4==4) print("True") else print("False") True will be printed because 4 equals 4. if(4==3) print("True") else print("False") will print False because 4 does not equal to 3 you can do the same with strings. if("Test"=="Test") print("True) else print("false") True will be printed because True= True. == is used because = is used for making something equal to something, and not checking if it equals to it. Another operator is !=. it used to check if something Does not equal to something. for example: if(4!=3) print("True") else print("False") True will be printed because 4 does not equal to 3
24th Mar 2018, 6:34 PM
Tomer Sim
Tomer Sim - avatar
+ 1
hence to get the true or false statements this is used
24th Mar 2018, 6:26 PM
Dharti Bardapurkar
Dharti Bardapurkar - avatar
+ 1
and what does '==' this sign mean
24th Mar 2018, 6:28 PM
Dharti Bardapurkar
Dharti Bardapurkar - avatar
+ 1
the first sign '<' means the no. on the left is less i.e. smaller the no. on the right and '>' means the no. on the left is greater than the no. on the right
5th Apr 2018, 2:49 PM
Farhan Javed
Farhan Javed - avatar