+ 1
Can you repair this program?
This is a program I wrote test to learn from experience. But it has an error that I cannot understand Can you explain this error and how to fix it (Error code I will note in the program in the location where the error is encountered) Thank you Link: https://code.sololearn.com/cA16a05A10A1
2 Réponses
+ 2
🔹Try to add global x in decode function
______________
def decode():
global x
# codes
...
______________
🔹Another way is to pass an argument to function.
______________
def decode(x):
# some codes
...
...
# call function with argument.
if y == 0:
decode(x)
______________
Please update us if this is still wrong. Thanks.
https://code.sololearn.com/cdpGe0WwIyAz/?ref=app
+ 1
Value is not assigned to x.