Sep 5, 2024
if condition:
followed by indented block.While Loop:
Kernel Interrupt
or stop button.For Loop:
for value in sequence:
Defining Functions:
def
keyword, can take inputs (arguments), return outputs.say_hello
prints a message.Arguments and Parameters:
filter_even
filters even numbers from a list.Scope:
Advanced Function Features:
return
to provide output from function.Modules: Import external Python files, use functions without polluting namespace.
import math
to use math.ceil