Why does <,> etc, doesn't work with functions? Please fix this code.😥😥😌🙂 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why does <,> etc, doesn't work with functions? Please fix this code.😥😥😌🙂

https://code.sololearn.com/cm9uuuM6BmrY/?ref=app

27th Feb 2020, 5:59 AM
Taraash Mittal
Taraash Mittal - avatar
2 Answers
+ 2
Logical operators work with function calls if your function is returning a value. Here your functions alpha(), beta(), gamma() are not returning anything. They are just printing the counts. To fix this code, just use return instead of print in your functions here.
27th Feb 2020, 6:13 AM
Mayur Garg
Mayur Garg - avatar
+ 2
Thanks so much, it is working now
27th Feb 2020, 6:20 AM
Taraash Mittal
Taraash Mittal - avatar