How do I continue to enter values ā€‹ā€‹after 'yes'? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I continue to enter values ā€‹ā€‹after 'yes'?

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

30th Jul 2020, 11:39 AM
ŠœŠøхŠ°ŠøŠ»
4 Answers
+ 1
def yn(): a = int(input()) b = int(input()) c = int(input()) if a == (b+c) or b == (a+c) or c == (a+b): print('yes') yn() else: print('no') return yn()
30th Jul 2020, 11:46 AM
Jayakrishna šŸ‡®šŸ‡³
30th Jul 2020, 11:49 AM
ŠœŠøхŠ°ŠøŠ»
0
You are not removed yn() in else part's return yn(). So it will cause to call Infinitely now, if true, then it from if part, if false, then from else..
30th Jul 2020, 11:53 AM
Jayakrishna šŸ‡®šŸ‡³
30th Jul 2020, 12:04 PM
ŠœŠøхŠ°ŠøŠ»