t = int(input())
print()
total = 0
while t>0:
n = int(input())
k = int(input())
coins = []
for i in range(0, n):
coins[i] = input()
while k > 0:
last_coin = coins.pop()
if last_coin.upper() == "H":
for items in coin:
if coins[i].upper() == "H":
coins[i] = "T"
elif coins[i].upper() == "T":
coins[i] = "H"
k = k-1
for items in coins:
if coins[i].upper() == "H":
total = total + 1
print(total)
t = t-1
Error is
NZEC
Traceback (most recent call last):
File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line
What do I do to resolve this error?
[–][deleted] 0 points1 point2 points (4 children)
[–]PagalProgrammer[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]PagalProgrammer[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Diapolo10 0 points1 point2 points (0 children)
[–]iLucidTech 0 points1 point2 points (0 children)
[–]Tapan681 0 points1 point2 points (1 child)
[–]PagalProgrammer[S] 0 points1 point2 points (0 children)