Phython Instant Flashcards
How to write complex numbers in Python?
complex(a,b)
What does Python use for the square root of -1?
j
How is the floor divison operator depicted?
//
The … rounds the division output down to the next smallest integer.
floor division operator
The floor division operator … .
rounds the division output down to the next smallest integer
The floor division operator rounds the division output … to the next smallest integer.
down
‘not equal to’ in Python is
!=
‘greater than or equal to’ in Python is
> =
How to add an element to a list?
my_list.append(‘element’)
How to convert a list to an array?
z = array(my_list)
How to create a 5x5 array with zeros only?
c = zeros((5, 5), dtype=float)
Indices in python start with … .
0
How to remove an element of a list?
my_list.remove(‘element’)
How to delete the first element of a list?
del my_list(0)
A … can represent a vector.
one-dimensional arrray