Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it?

William Bryant gogobebe2 at gmail.com
Thu Sep 19 14:46:22 EDT 2013


the word 'def' has  squiggily lines but the program works fine. It says: Syntax Error: expected an indented block. - why?

def restart():
    print("""

    ~~~~~~~~~~~~~~~~

    Cacluation DONE!

    ~~~~~~~~~~~~~~~~

    """)
    restart = input("\nEnter yes if you want to make a new list and no if you want to close the program (yes/no):  ")
    restart
    if restart == "yes" or restart == "y" or restart == "new list":
        print("You want make a new list...\n")
        time.sleep(1)
        NOS()
    elif restart == "no" or restart == "n" or restart == "close":
        print("Goodbye!")
        time.sleep(1)
        print("Goodbye!")
        time.sleep(1)
        print("Goodbye!")
        time.sleep(1)
        print("Goodbye!")
        time.sleep(1)
        print("Goodbye!")
        time.sleep(1)
        quit()
    else:
        print("type y or n")
        time.sleep(0.5)
        restart()



More information about the Python-list mailing list