Faces, Debugging, Lists, Mutation, Objects

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/12

flashcard set

Earn XP

Description and Tags

1.6-1.10 3.1-3.5 9.9 10.6, 10.8, 10.10-10.13

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

syntax

structure of a program and rules abt the structure

2
New cards

Who or what typically finds syntax errors

compiler / interpreter

3
New cards

Who or what typically finds runtime errors

interpreter

4
New cards

runtime error

error does not appear until you run the program

5
New cards

semantic error

program will run but not deliver the correct result

6
New cards

important part of debugging

boundary conditions

7
New cards

what does strings are immutable mean

cannot change an existing string

8
New cards

what operator concatenates a list

+

9
New cards

lists are mutable means

change an item in a list by accessing it directly as part of the assignment statement using an []

10
New cards

how to insert elements in a list

  • squeezing them into an empty slice at the desired location

ex:

alist = ['a', 'd', 'f']

alist[1:1] = ['b', 'c']

print(alist)

alist[4:4] = ['e']

print(alist)

['a', 'b', 'c', 'd', 'f']
['a', 'b', 'c', 'd', 'e', 'f']

11
New cards

what does the is operator do

  • test whether two names refer to the same object

  • is operator will return true if the two references are to the same object

12
New cards

what is a list

collection of references to objects

13
New cards

aliased

same list has two different names