4.4 Flashcards
What do you use the type() function for?
to know the type of the variable
_____ are reserved memory locations to store values.
variables
if you assign a value 5 to var then the type of the variable will be _______.
integer
T or F: python displays the variable type based on the value assigned to it.
true
A ______ is a basic element that a program works with, such as number or letter.
Value
if you assign ‘python is fun’ to a variable var, then the type will be ______.
string
T or F: python has 33 keywords reserved that cannot be used as a variable name.
true
name 4 basic variable types in python:
- integer. 2. string. 3. float. 4. boolean.
Name the type of variable:
It is real numbers expressed in decimal or scientific notation.
Float
Name the type of variable:
it is any logical true/false quantities.
boolean
Name the type of variable:
it is textual snippets comprising any number of character
string
Name the type of variable:
any positive, negative, or zero value.
integer
(operators/operands) are special symbols that represent computations like addition, subtraction, multiplication, and division.
operators.
_______ are the values the operator is applied.
operands.
T or F: when more than one operator appears in an expression, the order of evaluation depends on the rules of precedence.
true
T or F: exponentiation has the highest precedence
false, parenthesis.
name at least 5 words that cannot be used as a variable name.
and, for, while, true, assert, del, raise, def, as, try, from, none, not, break, or, if, else, pass, is, with, class, in, continue, elif, finally, yield, lambda, return, import, global, and nonlocal.