Data Types Flashcards
What does the “round()” function allow you to do?
Round a number to a specified # of decimal places
Numbers with fractional parts are called?
Floats
Booleans represents two values which are what?
True or False
How can you switch the value of a boolean?
By using not
not True is equivalent to what?
False
not False is equivalent to what?
True
What are strings most commonly used for?
Represent text
How can you get the length of a string?
len()
What data type is a number in a string?
String
What does concatenate mean?
Link together in a chain or series
Can you multiply a string by an integer?
Yes
Can you multiply a string by a float?
No
When you multiply an int or float by a boolean w/ True value what does it return?
With value False?
The same int or float
Always 0
If you multiply a string by a boolean with value True what does it return?
With False?
True
An empty string (or len0)
False + False
0