0

Error:-

enter image description here

Code:-

def main():
    
    # Input
    place = input("Will we go to north carolina?")
    if (place == "Yes"):
        print ("The drive will take all most a full day.")
    else:
        print ("I do not know how long the drive wil last.")
   
main()

It is saying invalid syntax and highlighting the main in red

1
  • 1
    Can you try entering the function first, then press enter twice so that you'll see ">>>" on the screen again, then call the main function. Commented Mar 12, 2021 at 15:59

1 Answer 1

1

You should run this multiline code in the script mode by going to New -> File

If you want to use this only, click enter twice after the function to get the prompt back

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.