In Python a function is some reusable code that may takes arguments(s) as input, do some computation, and then may return a result or results.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
No hints are availble for this assesment
Answer is not availble for this assesment
Please login to comment
6 Comments
Hello CloudxLab team,
Can you please provide an example to understand how a function may return multiple results ?
Upvote ShareHi,
Below is a function that return multiple values:
Thanks.
Upvote Shareok..thank you ..i executed your above code , but I have only called func () in the code below & not done any print , so can you please let me know why it still shows output ?
Hi,
This is because of the return statement.
Thanks.
Upvote ShareFunction does not necessary return a value. so statement should be false.
Upvote ShareHi Usha,
You are right! We have changed the question, would request you to try once again.
Thanks.
-- Rajtilak Bhattacharjee
Upvote Share