Can someone tell why test case 4 and 5 are not happy with my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
16th Jan 2023, 3:51 PM
chess doctor
chess doctor - avatar
4 Answers
+ 3
"An expression can include multiple operations." Ex: (5+4-1) will not supported by your code.
16th Jan 2023, 4:10 PM
Jayakrishna 🇮🇳
+ 5
chess doctor , the task description says: > An expression can include multiple operations.
17th Jan 2023, 10:53 AM
Lothar
Lothar - avatar
+ 1
Multiple . operations are not mentioned in the problem statement. Anyway i ll take that into account and try
16th Jan 2023, 4:22 PM
chess doctor
chess doctor - avatar
0
x = int(input()) a = input() l = a. split() for i in range(len(l)): if eval(l[i]) == x: print("index",i) break else: print("none") #Look how I have done this! Just take a glance
18th Jan 2023, 11:20 AM
Dr sOuL
Dr sOuL - avatar