Assert | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Assert

Why can’t I use other signs except == while using assert? Check my code for more understanding https://code.sololearn.com/ceZ0ERF1TpSs/?ref=app

20th Aug 2020, 4:12 PM
Elijah Oduyemi
Elijah Oduyemi - avatar
10 Answers
+ 4
1.Your code is not like calculator code. 2.You have errors.If you have already given its values ​​through a function in your code, then why did you put input? Look at this code. https://code.sololearn.com/coEQNiCIijZ4/#
20th Aug 2020, 6:51 PM
Galstyan
Galstyan - avatar
+ 4
Pratik Shinde If you have already given its values ​​through a function in your code, then why did you put input?
20th Aug 2020, 6:58 PM
Galstyan
Galstyan - avatar
+ 4
Galstyan Code was written by Elijah Oduyemi i did changes But what actually happening he is trying to call function by giving random input and then values changes in function to user input for desired result.Yaa its funny that, its not good way to code. But i didn't change that for him to understand in his way
20th Aug 2020, 7:04 PM
Pratik Shinde
Pratik Shinde - avatar
+ 4
I know that the written code is not yours. I just thought you could correct it. Yes, writing that way is not a good idea, that's why I made some changes, you will see what I corrected.
20th Aug 2020, 7:30 PM
Galstyan
Galstyan - avatar
+ 3
Elijah Oduyemi See this one i made changes == To <= Remember assert only executed when condition false I hope this helped you If you have doubt mention me in comment https://code.sololearn.com/crWgNXAYH1IN/?ref=app
20th Aug 2020, 6:49 PM
Pratik Shinde
Pratik Shinde - avatar
+ 2
Elijah Oduyemi Yes, i know, that is your code.Did I say that is not what you wrote?
21st Aug 2020, 10:12 AM
Galstyan
Galstyan - avatar
+ 2
Oh no no,I did not mean you, I wrote it to Pratik, I forgot to mention the name, sorry🙂
21st Aug 2020, 8:33 PM
Galstyan
Galstyan - avatar
+ 2
Otherwise I know this is your code🙂😉
21st Aug 2020, 8:34 PM
Galstyan
Galstyan - avatar
+ 1
Galstyan its my code. I personally wrote it
20th Aug 2020, 11:35 PM
Elijah Oduyemi
Elijah Oduyemi - avatar
+ 1
Galstyan This is what you said (I know that the written code is not yours. I just thought you could correct it. Yes, writing that way is not a good idea, that's why I made some changes, you will see what I corrected.)
21st Aug 2020, 1:37 PM
Elijah Oduyemi
Elijah Oduyemi - avatar