mercredi 31 janvier 2018

If statement in PyCharm seems to be misbehaving

I'm working on a program to draw irregular polygons based on a number of sides. I don't have much so far, and I'm fairly new to this, but I'm getting a syntax error I don't understand.

Heres the code:

    sides = input("How many sides? ")
    twosides = ("""/\""")
    """
    for sides in sides:
        if sides %2 == 1
            print(twosides)

It wants me to give a [ or a

    for

statement and i dont understand why.

Any help?

Aucun commentaire:

Enregistrer un commentaire