Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python functions

# first we have to write 'def'
# then our function name followed by ()
# and a ':' abd defining  block of code

def multiply():     # naming convention could be same as variable for functions
    product = 10.5 * 4
    return product


product = multiply()
print(product)
 
PREVIOUS NEXT
Tagged: #python #functions
ADD COMMENT
Topic
Name
2+1 =