+ 2

What's the answer please explain???

result = 1 s=input("abcabc") if (len(s)>3): result = 2 if (len(s)<6): result = 3 elif (len(s)>6): result = 4 else: result = 5 print(result)

23rd Oct 2019, 1:04 PM
harry thas
harry thas - avatar
3 Respostas
+ 1
Did you try to get? Result is 2; Edited:- If input is abcabc then Result is 2. but according to this code depends the length of input taken by you at runtime.
23rd Oct 2019, 1:32 PM
A͢J
A͢J - avatar
+ 1
Well, it depends on the length of the input you type at runtime.... 🤔
23rd Oct 2019, 1:48 PM
Loïc Mahé
Loïc Mahé - avatar
0
Hi. You can write codes in this app. The answer is 3, because if you don't input anything the len of s will be 0. https://code.sololearn.com/cPQJrW9mdv87/?ref=app
23rd Oct 2019, 1:32 PM
Dmytro Novak
Dmytro Novak - avatar