0
I'm a first time learning a language, started with python. I know it's a naive and small code, I shouldn't be asking this.
I understand there a problem with = sign, but no idea how to solve it, please help https://code.sololearn.com/czas6zskxY4l/?ref=app
5 odpowiedzi
+ 3
if rises == “East”
= is assignment operator
== checks if it is equals to
+ 1
if chances is greater than 50 then print Yes
here you are checking a condition if its greater than Similarly conditions can be
== equals to
> greater than
< less than
>= equal or greater than
<= equal or less than
but
= means you are assigning a value
like assigning a value to a variable
name = “Shubham”
here you are not checking any condition you are assigning a value thats it.
0
Understood, thank you so much
0
Sharique Khan code worked. Thanks but can you explain why this code worked
chances = int(input())
if chances>50:
print ("Yes")
else:
print("No")
0
Alright, thanks again. You have been amazing. Expect few more tags as I go further learning the language.