+ 2

Pls say me What this means?(in python)

x==5

27th Oct 2017, 6:54 PM
Ashoob
Ashoob - avatar
7 ответов
+ 5
It's an expression, a comparison between x and 5 as a number, if x value equals 5 the expression evaluates to true. Comparison is common in branching or decision making, a simple example: x = 5 if x == 5: print("Okay give me 5") Hth, cmiiw
27th Oct 2017, 7:11 PM
Ipang
+ 2
please put the language of your question in the tags.
27th Oct 2017, 7:07 PM
sneeze
sneeze - avatar
+ 2
if x equal 5 -->return true if x not equal 5 -->return false
27th Oct 2017, 9:18 PM
Reza
Reza - avatar
+ 1
ok its very easy if you say x=5 you are creating a variable x that will be equal to 5. x==5 is what we call a Boolean. think of x==5 as a variable itself which can have two values: true and false if you already set the variable x to 5 wether by hand or through any other way x==5 will turn out as true, else it will be false. x==5 is can be used in if statements, loops, and any other thing that accepts Booleans as conditions. other Boolean syntaxes are: x>5 for x bigger than 5, x!=5 for x not being 5, (x+y)==5 for when a given variable x and y equal 5 when added together, etc...
27th Oct 2017, 7:39 PM
TheLegend27
TheLegend27 - avatar
+ 1
tnx 💖💖
27th Oct 2017, 9:53 PM
Ashoob
Ashoob - avatar
+ 1
داداچ ینی ایا x برابر با ۵ هست یا ن
29th Oct 2017, 9:07 AM
Mr.zare.jedy
Mr.zare.jedy - avatar
+ 1
ممنون استاد عشقی💟💟💟
29th Oct 2017, 10:32 AM
Ashoob
Ashoob - avatar