A function definition : Function Define : Function : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  Function   » [  Function Define  ]  Screenshots 
 



A function definition




def square(x):
    'Calculates the square of the number x.'
    return x*x


print square(100)

           
       
Related examples in the same category
1.  Power function Power function
2.  Define simple function in Python Define simple function in Python
3.  A function that writes the Fibonacci series to an arbitrary boundary A function that writes the Fibonacci series to an arbitrary boundary
4.  Define a function in Python Define a function in Python
5.  Factorial function Factorial function
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.