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
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
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)
4
Q
A