2.2 Flashcards
(29 cards)
What is an integer?
A whole number
What is a float?
A number with a decimal point
What is a character?
A single character/symbol that can be typed
What is a string?
Zero or more characters enclosed in quotation marks
What is a Boolean data type?
Can only take the value of True or False
What is a constant?
A value that cannot change during the execution of the program
What is the arithmetic operator for addition?
+
What is the arithmetic operator for subtraction?
-
What is the arithmetic operator for multiplication?
*
What is the arithmetic operator for division?
/
What is the arithmetic operator for modulus?
MOD
What is the arithmetic operator for quotient?
DIV
What is the arithmetic operator for exponentiation?
**
What is the comparison operator for equal to?
==
What is the comparison operator for not equal to?
!=
What is the comparison operator for less than?
<
What is the comparison operator for less than or equal to?
<=
What is the comparison operator for greater than?
>
What is the comparison operator for greater than or equal to?
> =
What is a sequence?
Statements are written one after the other and execution follows the same order
What is a selection statement?
if…then, else, elif
What is casting?
Converting to another data type
What is concatenating?
joining together strings
What is indexing used for?
to isolate a single character in a string