Write a method that can calculate the square value of the number

Question:

Write a method that can calculate the square value of the number

Hints:

Using the ** operator

Solution:

def square(num): return num ** 2 print square(2) print square(3)
Code language: Python (python)

Leave a Comment