Computer Science, asked by kripa1048, 7 days ago

Write a user defined function in python to find cube of a given number by passing argument and no return value.

Answers

Answered by harshvirsing55
5

Answer:

\red{\fbox{\tt PROGRAM IN PYTHON LANGUAGE}}

def cube(a):

   b=a* *3

   print("Cube of",a,"=",b)

num=int(input("Enter your number:-"))

cube(num)

\blue{\fbox{\tt O U T P U T}}

Enter your number:-2

Cube of 2 = 8

\orange{\tt Hope it will} \green{\tt help you.}

Attachments:
Answered by llitskookiell
4

Answer:

def cube(a):

b=a* *3

print("Cube of",a,"=",b)

num=int(input("Enter your number:-"))

cube

O U T P U T

Enter your number:-2

Cube of 2 = 8

Hope it will help you.

Similar questions