Welcome to Westonci.ca, the ultimate question and answer platform. Get expert answers to your questions quickly and accurately. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.
Sagot :
Answer:
Is it advisable to use the print statement in the function to display output rather than placing a return statement at the end and using the print(function(a))?
Also what implications would there be if I used both a print statement and a return statement in a function to display the same output? Lets imagine I need to show the answer for c and then use the value of c somewhere else. Does this break any coding conventions?
So the highlight of the question isn't the difference between print and return, but rather if it is considered a good style to use both in the same function and if it has a possible impact on a program.
We hope our answers were useful. Return anytime for more information and answers to any other questions you have. We appreciate your time. Please come back anytime for the latest information and answers to your questions. Thank you for visiting Westonci.ca, your go-to source for reliable answers. Come back soon for more expert insights.