Python Forum

Full Version: homework
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ArPe = str(input("Area Or Perimeter? "))
print("Ok " + ArPe + " we will calculate"):
    if arpe == "area" or "perimeter":
        x = "true"
    elif arpe == null or int:
        x = false 
    else:
        print("wot have u done?")
print(x)
Error:
File "/home/main.py", line 2 print("Ok " + ArPe + " we will calculate"): ^ SyntaxError: invalid syntax
i dont understand :( help
A colon at the end of a line indicates the start of an indented block of code, but it can only come after certain statements (if/elif/else, for/while, class/def, try/except/finally, with). The print function does not qualify.