Your suggestions corrected problem in previous block of script, but I'm getting the same error in the following block in line 4. Same error as before - "SyntaxErro r 'return' outside function." What does "outside function" mean or indicate? I've tried modifying the script modeled on the changes previously recommended, but nothing I do in terms of indentation helps. May I impose again to ask for help.
I hope...
User Profile
Collapse
-
My apologies. I didn't know about the code tags. I realized the indentations were important but didn't know how to display them properly. I'll try to do better next time.
Anyway in the script the indentations are there but that hasn't affected the SyntaxError I keep getting saying the line "return None" is "outside function."
Can you address that particular SyntaxError? I'll copy the suggested...Leave a comment:
-
Python SyntaxError "Outside Function"
I'm new to Python. I got this Python script from a friend. When I run it, I get an error message for line 7, "return None" saying "SyntaxErro r: 'return' outside function" Can someone explain what the SyntaxError is and how to fix it?
Here's the block of script. The error occurs in line 7.
def PC1(key, src, decryption=True ):
sum1 = 0;
sum2 = 0;
keyXorVal = 0;
if len(key)!=16:...
No activity results to display
Show More
Leave a comment: