Contents:
  1. Functions 1. Properties of functions 1. Usage

Functions

Csq supports functions, they can be called and used without the need to rewrite the code again.

Properties of functions

  • functions are defined by def keyword.
  • function declaration is not allowed unlike C/C++.
  • functions follows dynamic typing due to which their return type can be anything based on the situation

Usage

def hello():
 print 'Hello'

def sum(a,b):
 return a + b 

hello_there()
print sum(5,100)

Output:

Hello
105
Posts (Latest 10 updated) : Read all