Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional statement in function not working #30

Closed
martin-henz opened this issue Apr 15, 2024 · 0 comments · Fixed by #32
Closed

Conditional statement in function not working #30

martin-henz opened this issue Apr 15, 2024 · 0 comments · Fixed by #32
Labels
bug Something isn't working

Comments

@martin-henz
Copy link
Member

https://share.sourceacademy.org/zl0m7

def f(n):
    if n == 1:
        return 1
    else:
        return 2

f(4)

currently gives:

Line 18: ExpectedTokenError: SyntaxError at line 18 column -1
                   

^ Expected newline. Found ''.
Screenshot 2024-04-15 at 1 48 26 PM
@martin-henz martin-henz added the bug Something isn't working label Apr 15, 2024
@JJtan2002 JJtan2002 linked a pull request Apr 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant