Return vs Print


< >
Hi, I am just curious about the difference between return and print statements. Are they interchangeable? What are their differences?

Replace this line with your code.


Definitely, no. They have no relationship other than that they appear to be endpoints in a negotiation. Get that idea out of your head. They have no connection. print is just a construct that outputs text to the display. It has no connection to the program, whatsoever. return however is deeply embedded in the program flow and is serving a vital programmatic role. Study up on scope.


What's with this? Too busy to read the post template and post actual code? You may get away with a couple of images, but sooner or later the community will abandon you and not answer. Get with the program and succeed in getting quick responses. Don't forget the link to the exercise, It, too, is important beyond immediate recognition.


I will keep that in mind next time. I am sorry for this. I am still trying to get around code academy. I only signed up 2 days ago. Thank you for taking the time to reply.