Header Ads

Write a method which can calculate square value of number In Python

Write a method which can calculate square value of number


Write a method which can calculate square value of number In PythonHints:
    Using the ** operator

Solution:
def square(num):
    return num ** 2
print square(2)

print square(3)
Powered by Blogger.