How to use of “return” keyword in a function?

PHOTO EMBED

Mon Apr 20 2020 13:32:07 GMT+0000 (Coordinated Universal Time)

Saved by @Smiley Doll #python #python #function #return

#define a function 
 Def cube(num)
      #write the formula of cube
      return num*num*num
     #give the number to calculate the cube 
     cube(3)
   # print the cube of that number simply by using print command
    print(cube(3))
     “return” keyword means that function have to return          value
content_copyCOPY

Return is the keyword that tells this function has to return value.

https://www.youtube.com/watch?v=rfscVS0vtbw&t=5s