CAN A FUNCTION RETURN VALUE
Problem Statement: You have learnt about finding squares and cubes of numbers in Mathematics. You can find these squares and cubes through programs too. Consider you have to create a function which returns the value of square and cube of any given number and returns the result as a return value from the function. Can you write a block code for this function in Makecode?
Learning Outcomes:
At the end of this exercise, you will learn:
• Decompose problems and subproblems into parts to facilitate the design,
implementation, and review of programs.
• Create procedures with parameters to organize code and make it easier to
reuse.
• Create prototypes that use algorithms to solve computational problems by
leveraging previous student knowledge.