Mapa mental
FUNCTIONS
Conteúdo do mapa
FUNCTIONS
Types of Functions
- Module-defined functions: Imported from Python modules (e.g., math.sqrt())
- User-defined functions: Created by the programmer using def keyword
- Built-in functions: Predefined (e.g., len(), print())
Creating User Defined Function
- def my_function(name, age, city): print(name, age, city)
- Contains logic/code inside the function body
Arguments and Parameters
- • Keyword Arguments/Named Arguments
- • Default Parameters
- • Positional Parameters/ Required Arguments
Function Returning Values
- Using return to send back result(s) to the caller
Scope of a Variable
- Global Scope: Defined outside any function, accessible throughout
- Local Scope: Defined inside a function
Flow of Execution
- Program starts from top, jumps to function when called, returns after execution
Informações
- Descrição
- Mapa Mental sobre FUNCTIONS, criado por LAT 2024 KVSRO MUMBAI em 25-06-2025.
- Criado por
- LAT 2024 KVSRO MUMBAI
- Visualizações
- 0
- Avaliação