com sci 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/10

encourage image

There's no tags or description

Looks like no tags are added yet.

11 Terms

1
New cards

arguments

An argument is the actual value you give to a function when you call it.

2
New cards

Parameters

placeholders for values while arguments are the actual values passed to the function

3
New cards

where do i look to find arguements?

Look at the procedure call to find the arguments, not the procedure definition.

4
New cards

What does list[x] mean?

Gets the item at position x in a list. Python starts counting at 0.

5
New cards

What does total = total + 1 do?

Increases total by 1. Used for counting.

6
New cards

What does total = total + list[x] do?

Adds the current list item to total. Used for finding a sum.

7
New cards

What does == mean?

Checks whether two values are equal.

8
New cards

What does % mean?


Finds the remainder after division. Example: 10 % 2 = 0.


9
New cards

How do you prevent an infinite while loop?

Update the variable controlling the loop, such as x = x + 1, so the condition can become false.

10
New cards

What does return do?

Sends a value back to where the function was called and ends the function.

11
New cards

What's the difference between print and return?

print displays information. return sends a value back to the caller.