w1 Flashcards
(19 cards)
What the difference between ‘==’ and ‘=’
’==’ checks whether left-side is equal to right side
‘=’ assigns value (right-side) to variable (left side)
what does += do in the example x += y
takes the current value of x, adds y to it, and stores the result back in x.
% meaning
remainder
/ meaning
true division
what is answer of true division
a float
what are intergers
whole numbers
what are floats
numbers with decimal points
what are complex numbers
real and imaginary numbers
what are strings
combination of any characters
what is boolean
true or false
what are variables
they can hold values within programs
how I figure out what type a value is
by using the type() function
how are values assigned to variables
through the ‘=’ operator
take round(12.3)
what is the function and argument
function is round()
arg is 12.3
what does the round function even do
rounds the float value of x to the nearest int
what type of data does true division always return
a float
what is the pass function
a no operation statement used when something in synoptically required
what type of error is an exception
run-time error
what does boolean consider false
the number 0 or any empty string, list, tuple etc