Python Misc. Flashcards

1
Q

Strongly Typed

A

Python is strongly typed.

Strong typing means that variables do have a type and that the type matters when performing operations on a variable

The type of an object doesn’t change in unexpected ways

1 + “1” = an error in Python

1 + “1” = “11” in JavaScript

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

Dynamically Typed

A

Dynamic typing means that the interpreter assigns variables a type at runtime based on the variable’s value at the time

Both JavaScript and Python are dynamically typed

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

range(num)

A

range returns a sequence of numbers between 0 and num, incremented by 1

you can also use it like this:
range(start, stop, step)

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