terms Flashcards

1
Q

variable

A

a reference to an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

object

A

a real piece of information stored in memory that can be reached using the id() function, where the variable name is written in the parentheses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Dynamic Typing

A

means a variable can be changed later in the code and everything will be fine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Static Typing

A

means a variable cannot be changed later in the code, or an error will appear

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Pros of Dynamic Typing

A
  • Very easy to work with

- Faster Development time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Cons of Dynamic Typing

A
  • May result in bugs for unexpected data types

- Need to be aware of type()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Indexing

A

Allows you to grab a single character from the string | starts at 0 | Ex: “hello” corresponds to index numbers 0 1 2 3 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Reverse Indexing

A

First letter corresponds to 0, but the last letter is -1 and it moves down the negative #s from there until the first letter | Ex: “hello” corresponds to 0 -4 -3 -2 -1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Format of slicing

A

[start:stop:step]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

“Start” section of a slice

A

A numerical index for the slice start

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

“Stop” section of the slice

A

The index you will go up to, but not include

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

“Step” section of the slice

A

the size of the jump you take

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

String Concatenation

A

Link things together | Ex:

x = ‘am’

‘P’ + x
‘Pam’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly