comp sci chapter 8 n 9 vocab

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

1/14

encourage image

There's no tags or description

Looks like no tags are added yet.

15 Terms

1
New cards

class

a set of instructions for creating objects with shared behaviors and data

2
New cards

function

a block of code that performs a specific task and only runs when called upon

3
New cards

doc string

written under a class or a function using three quotes :’’’ ‘‘‘ to describe what the class or functions purpose

4
New cards

parameter

the variable that is written within the parentheses when making and defining a function

5
New cards

argument

the actual value inside the parentheses when calling the function

6
New cards

positional arguments

arguments matched to parameters in the same order they are written in the function cell

7
New cards

return value

is what causes the function to have an output that can be used in other code

8
New cards

args

a special syntax within a function used in function definitions that allows any number of positional arguments

9
New cards

kwargs

special syntax that is used to define a function that allows it to accept any number of named arguments

10
New cards

instance

a specific object created from a class

11
New cards

attribute

is a varibale/value associated with an instance

12
New cards

method

a function that is within a class

13
New cards

__init

a special method that python automatically runs when a new instance is made from a class, it is needed because it immediately assigns an objects initial state and data

14
New cards

self

required first parameter in instance methods that refer to the specific instance being accessed

15
New cards

inheritance

making a new class that takes on attributes and methods from a pre-exsisting class