Hi guys I hope you do well. Because of some problems I couldn't keep my training in coding. But now I want to start from buttom | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hi guys I hope you do well. Because of some problems I couldn't keep my training in coding. But now I want to start from buttom

And I need your help.could you plz help me in this code?? https://code.sololearn.com/W4n4PUZebqCH/?ref=app In this code there is a problem because my function do the work twice but I don't want to be in this way

1st Jul 2019, 7:10 PM
Sina
Sina - avatar
3 Answers
+ 6
Sina It’s super simple, and with time and practice, you’ll understand which to use when. = is used for assinging things. like x = 5. You’re telling the program that the variable x is equal to 5. The == compares two things. For example, 5 == 5 will return true, because 5 is equal to 5
1st Jul 2019, 11:00 PM
Jax
Jax - avatar
+ 8
Logical Error in line 20 & 24 , u are using assignment operator instead of comparison....in both the if statements, use == instead of = 👍👍
1st Jul 2019, 7:19 PM
Amz42
Amz42 - avatar
+ 1
Aman thank you so much for ansewring my question but I can't underestand the difference between = and == can you fill me in??plz
1st Jul 2019, 9:56 PM
Sina
Sina - avatar