Solution: Print the Square of a Positive Number

Learn how to write a function that prints the square of a positive number if the input is correct; otherwise, display a relevant error message.

We'll cover the following

The solution to the problem of writing a function that prints the square of a positive number if the input is correct, or otherwise displays a relevant error message is given below.

Solution

Get hands-on with 1200+ tech skills courses.