Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 6 Online
OpenStudy (anonymous):

All of a sudden, my Python compiler is giving a line after all my results saying "None". Looks like it is printing the value of some variable. I closed all programs and reopened, etc, but it still continues. Any clues?

OpenStudy (rsmith6559):

Looks like a function is returning a None value.

OpenStudy (anonymous):

And how would I find that out?

OpenStudy (andrew.m.higgs):

Look through your code and check if any of your procedure are not returning. Alternately, you could paste the code so others could take a look an possibly spot the problem for you.

OpenStudy (anonymous):

you are likely using a print statement inside a function when you want to use a return statement

OpenStudy (anonymous):

Looks like I had accidentally uncommented one of the Comment lines way below in the template. Thanks for all the replies.

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!