the code is giving RUNTIME ERROR i.e. EOFError help me ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

the code is giving RUNTIME ERROR i.e. EOFError help me ??

test = int(input()) for l in range(test) : s=int(input()) t=s songs = [] for m in range(t) : b=int(input()) songs.append(b) fav=int(input()) k=songs[fav-1] for i in range(s) : for j in range(i,s-1) : if songs[j]>songs[j+1]: temp=songs[j] songs[j]=songs[j+1] songs[j+1]=temp print(songs.index(k)+1)

25th Dec 2016, 2:40 PM
sam cool
sam cool - avatar
1 Answer
+ 1
You're testing your script in code playground isn't it? Well, it's a little restrictive, you cannot do all like offline, by compiling and especially by running :( One of these restriction, is for input: you are constrained to give ALL the entries your script need ( each separated by a new line ) in the pop-up just before execution in fact... So, you can just simulate interactivity :( Test your script at home, I mean in real on your OS and not in the code playground simulator ( but it makes great services anyway ^^ )
25th Dec 2016, 2:48 PM
visph
visph - avatar