Variable in non-existing line python

Describe your issue

Convert string to number Convert string to number Practice Problem in Strings - CodeChef
When I try to to submit code I get error from line that is not existing in my code.

Screenshot

Code:
def string_to_number():
# Write your code here
for _ in range(int(input())):
s = input()
num = 0
for char in s:
num = num*10+(ord(char)-ord(“0”))
print(num)

string_to_number()

Error:
image

Additional info

Help me please, I do not understand what should i do here to solve this :smiley:
It is first time that I see this kind of upload of photos.
Tried adding the mentioned variable and etc, but nothing.

After numerous tries found the BUG.
Copy from task:

Input Format

  • The first line contains a single integer, T, the number of test cases.
  • The following T lines each contain a single string, S, representing the number.

It seems that even if they ask to handle test cases code as in earlier lessons but You cannot do this, because if You handle the test cases the error stars showing up because they hid the test cases code after Your visible code lines. That means that we should not handle test cases because it is handled already.
Sad that I had to figure out this myself :frowning:

Code that works:
def string_to_number(s):
# Write your code here
num = 0
for char in s:
num = num*10+(ord(char)-ord(“0”))
return num