Class 3 - Python
Class 3 - Python
If
Marks>70: else
Get Ice Cream Give Practice Test
Pseudo-Code: if-else
If(condition):
Statements to be executed….
else:
Statements to be executed…..
Looping Statements
while condition:
Exit While loop Execute Statements
True
Body of While
For Loop
Function (Recipe): A function like a recipe is a set of instructions that perform a specific task or operation.
Just like a recipe, a function has a name and can take inputs (ingredients) and produce an output (result).
Functions can be reused multiple times, just like a recipe can be used to make the
same dish repeatedly. They allow us to write code once and use it in different parts of a
program.
Python Functions
A small anonymous function , taking any number of arguments, having one expression