+ 2
Pls say me What this means?(in python)
x==5
7 Respuestas
+ 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
+ 2
please put the language of your question in the tags.
+ 2
if x equal 5 -->return true
if x not equal 5 -->return false
+ 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...
+ 1
tnx 💖💖
+ 1
داداچ ینی ایا x برابر با ۵ هست یا ن
+ 1
ممنون استاد عشقی💟💟💟