Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 24 Online
OpenStudy (anonymous):

when I go to set up a new function, it will not let me list the parameters. for example, Ill type >>> def example(x) : --- if x%2 == 0 then it says IndentationError: expected an indented block. What am I doing wrong?

OpenStudy (anonymous):

Nevermind figured it out

OpenStudy (anonymous):

you have to listen to the syntax error, if you forgot an indent, then it means you need indentations somewhere. im not exactly sure where but try moving the if statement over 4 spaces

OpenStudy (anonymous):

For future posts, it is easiest for the rest of us to see what exactly went wrong if you copy your code & paste it into a web service like dpaste or codepad. Then you can provide the link to your code. Just make sure you choose "python" as your language. http://dpaste.com/ http://codepad.org/ http://ideone.com/ My personal favorites are codepad & ideone because they will run your program and print any output or errors.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!