Last answered:

30 Sept 2022

Posted on:

27 Sept 2022

0

Print "outcome" and return result

I have struggled to prove this but it keeps giving me only outcome. I have reviewed my codes over and over again but the result will not be printed. Is there something that I need to know or am I just wrong?

4 answers ( 0 marked as helpful)
Posted on:

28 Sept 2022

0

Hi Martin,

Could you provide a screenshot of the code so we can investigate you case with more information?

Posted on:

28 Sept 2022

0

image.png

Posted on:

28 Sept 2022

0

That's weird, I replicated your function plus_ten() and it worked just fine.
image.png

Could you try restarting the kernel, then re-run your code? You can refer to the image below:
image.png

Instructor
Posted on:

30 Sept 2022

0

Hi Martin and Carl,

Thanks for reaching out.

@Martin: Indeed, as Carl suggests, please restart the kernel and retry, since it seems that you have executed several cells prior to running plus_ten(2).
We can understand this after observing the number of the executions from the screenshot you've provided. It isn't clear what executions between 87 and 91, inclusive. We all make this simple mistake sometimes (i.e. running cells that interrupt the flow of the operations we intend to implement). Thus, restarting the kernel helps.

Hope this helps but please feel free to get back to us should you need further assistance. Thank you.

Kind regards,
Martin,
The 365 Team

Submit an answer