62
#if exp1 != 0, the expression returns 0. Otherwise, the expression returns 1.
8.3.4 Assignment Expression
Variable name (id) = exp
The value of an assignment expression is the representation of a variable. An
expression is an assignment expression only if the variable has already been
defined. If the variable is not defined, it is a variable definition statement.
8.3.5 Function Call Expression
Function name (argument list);
8.4 Statement
8.4.1 While Loop Statement
while (exp):
…
end
8.4.2 Break Statement
break;
#Break statement is used to Jump out of the current while loop.
For example:
i = 1;
while( i < 10 ):
i = i +1;
if i > 7:
break;
end
end
8.4.3 Function Definition
def fun(parameter list ):
…
return exp;
end
For example: