Chapt 4 W

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/20

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:37 AM on 10/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Function

A named block of code that performs a specific task.;

2
New cards

def

Keyword used to define a function.;

3
New cards

Function call

Tells Python to execute a function.;

4
New cards

Parameter

A variable in a function definition that receives a value.;

5
New cards

Argument

A value passed to a function when it is called.;

6
New cards

return

Sends a value from a function back to the code that called it.;

7
New cards

main()

Function used to organize the main flow of a program.;

8
New cards

if name == "main":

Checks whether the file is being run as the main program before calling main().;

9
New cards

Default value

A parameter value automatically used if an argument is not supplied.;

10
New cards

Named argument

Passes an argument by specifying the parameter's name.;

11
New cards

Positional argument

An argument matched to a parameter based on its position.;

12
New cards

Local variable

A variable defined inside a function and usable only within that function.;

13
New cards

Global variable

A variable defined outside functions that has global scope.;

14
New cards

Shadow variable

A local variable with the same name as a global variable; recommended to avoid.;

15
New cards

Module

A file containing Python code, such as functions, that can be imported.;

16
New cards

import

Makes another module available to the current program.;

17
New cards

Namespace

Space that stores the names and functions associated with a module.;

18
New cards

import module as name

Imports a module using a different namespace name.;

19
New cards

from module import function

Imports a specific function into the global namespace.;

20
New cards

Name collision

Occurs when imported items have the same name and interfere with one another.;

21
New cards

Hierarchy chart

Diagram showing how a program is divided into functions, beginning with main().;