Ask Experts Questions for FREE Help !
Ask
    benigmo's Avatar
    benigmo Posts: 1, Reputation: 1
    New Member
     
    #1

    Oct 19, 2015, 07:34 AM
    Python "Invalid Syntax" error message on coln
    Okay, so I'm VERY new Python(I believe I'm using 3.4.2) I'm still experimenting and self-learning. I wrote a script, but it gives me an "Invalid Syntax" error on a colon every time. I'm not really sure why. It's also probably tru that I am just doing this entire thing completely incorrectly, so if you could just answer this question, it would help me a lot. Also, I tried getting rid of the colon(which I didn't think was the problem, anyway) but then on the next line, it just gave an "Unexpected Indent"error message. Here is the script I have:


    input(number): #<--- Syntax error here
    if type(number) == int or type(number) == float:
    return abs(number)
    elif len(number) > 9:
    return “Figure too long!”
    else:
    return “Invalid figure!”


    print (return)
    Invalid syntax

Check out some similar questions!

Music video with phrases like blogging, she's hip, she's cool? [ 0 Answers ]

Im searching for a weird music video that my friend once showed me , the singer was a girl wearing bright "quirky fashionable" clothes.. in the song the word "Blogging" is repeated a lot , and so is the phrase "She's hip, She's cool!" Do you know this ?


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.