source-academy / py-slang

Python sublanguage for SICP
Apache License 2.0
0 stars 0 forks source link

Conditional statement in function not working #30

Closed martin-henz closed 2 months ago

martin-henz commented 2 months ago

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