0
Calculate middle index code won't run.
Hi. I tried this code in another python ide and it ran fine. Am I going something wrong? print (items[(len(items)//2)-1])
6 Réponses
+ 2
Middle index may not work in plural so you need to put filter
+ 2
Luke Cadwell it works fine for me. What is the error message you are getting?
+ 1
That's what I run
Items =[1,4,3];
print (items[(len(items)//2)-1])
+ 1
I tried it in sololearn, here is the link
https://code.sololearn.com/c4JqOcd6r2Pe/?ref=app
0
It just has an X next to test case 1. I don't see how you're supposed to see if it's correct or not with no test case results.
0
Ok, if yours works and mine works then solo learn has a problem.