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])

17th Nov 2020, 5:19 PM
Luke Cadwell
Luke Cadwell - avatar
6 Answers
+ 2
Middle index may not work in plural so you need to put filter
17th Nov 2020, 5:27 PM
Ananiya Jemberu
Ananiya Jemberu - avatar
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.
17th Nov 2020, 6:04 PM
Luke Cadwell
Luke Cadwell - avatar
0
Ok, if yours works and mine works then solo learn has a problem.
17th Nov 2020, 6:08 PM
Luke Cadwell
Luke Cadwell - avatar