python开立方函数
Given a number, and we have to write user defined functions to find the square and cube of the number is Python.
给定一个数字,我们必须编写用户定义的函数来查找数字的平方和立方是Python。
Example:
例:
Input:
Enter an integer number: 6
Output:
Square of 6 is 36
Cube of 6 is 216
Function to get square:
获得平方的函数:
def square (num):
return (num*num)
Function to get cube:
获取多维数据集的功能:
def cube (num):
return (num*num*num)
Program:
程序:
# python program to find square and cube
# of a given number
# User de