1/82
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Integers
These are numbers devoid of the fractional part
Floating Points or floats
These are numbers that contain or can contain the fractional part
Type
These numbers differ significantly in how they are stored in computer memory and the range of acceptable values. The characteristic of the numeric value that determines its kind, range, and application is called the t______.
Integers
It is a string of digits that make up the number.
Digits
Integers must not be interjected with any characters that are not d_______. For example, the number eleven million one hundred and eleven thousand one hundred and eleven can be written as 11,111,111 or 11.111.111, or even like 11 111 111.
prohibited
This provision gives it readability, especially when the number consists of many digits. However, Python does not accept this as it is p_________.
underscores
What Python does allow, though, is the use of u____________ in numeric literals. Therefore, the number can either be 11111111 or 11_111_111.
minus (-)
Negative numbers in Python are written by adding a m________ such as -11111111 or -11_111_111.
permissible
Positive numbers do not need to be preceded by the plus sign, but it is p____________.
Octal and hexadecimal numbers
These are two (2) additional conventions in Python that are unknown to the world of mathematics.
0O or 0o prefix (zero-o)
It will be treated as an octal value if an integer number is preceded by an ____or ______ prefix).
[0..7]
Octal values must contain digits taken from the ____ range only.
octal
0o123 is an o_______number with a (decimal) value equal to 83. The print() function does the conversion automatically.
83
0o123 is an octal number with a (decimal) value equal to __.
0x or 0X (zero-x)
a number will be treated as a hexadecimal value if it is preceded by the prefix ___ or ______.
hexadecimal
0x123 is a h______________number with a (decimal) value equal to 291. The print() function can also manage these values.
291
0x123 is a hexadecimal number with a (decimal) value equal to ___
print()
This function can manage/convert octal and hexadecimal values.
Float
It is designed to represent and store numbers with a non-empty decimal fraction.
fractional
Float numbers have or may have, a f____________ part after the decimal point.
2.5 and -0.4
For example, two and a half or minus zero point four is read as ____ and ____ by a computer.
commas
It is also important to note that numbers must not contain any c_______. Python does not accept the c_______ as it has its reserved meaning in Python.
zero
Removing the z____ if it is the only digit in front of or after the decimal point is possible. Thus, 0.4 can be written as .4, and 4.0 could be written as 4. and have its type or value unchanged.
point (.)
The p_______ makes a number a float.
E/e
This letter represents exponents incorporated into a number string such as 3E8.
exponents
The letter E/e represents e___________ incorporated into a number string such as 3E8.
integer
The exponent (value after E) has to be an i________, while the base (value in front of the E) may be an integer.
notation
It also must be noted that the chosen form of coding float values does not mean that Python will present it in the same way. This language may sometimes choose a different n_______.
1e-22
For example, the following float literal: 0.0000000000000000000001 will result in _______ when run using the print() function in Python, as it always chooses the more economical form of the number's presentation.
economical form
For example, the following float literal: 0.0000000000000000000001 will result in 1e-22 when run using the print() function in Python, as it always chooses the more e____________ f______ of the number's presentation.
Strings
These are used when processing texts and not numbers.
quotes ("")
A string is incomplete without q_________.
escape character
Assume that words inside a string need to be quoted, such as She screamed, “You need to calm down” at the top of her lungs, which is ironic. There are two (2) possible solutions. The first is based on the concept of the e_______ c___________, which is played by the backslash ().
backslash
The b__________ can escape quotes, too. A quote preceded by a b_________ changes its meaning – it is not a delimiter but just a quote.
apostrophe (')
The second solution is to use an a_____________ instead of a quote.
quote
Either of these characters may delimit strings, but it should be consistent in such a way that: o If a string opens with a quote, it must also be closed with a q____
apostrophe
Either of these characters may delimit strings, but it should be consistent in such a way that: o If a string starts with an apostrophe, it must also end with an a__________
embed
To e________ an apostrophe into a string, there are also two (2) possible ways: Example string: I’m not going to give up. It can be written as: print("I'm not going to give up.") or print('I\'m not going to give up.')
Boolean value
Each time Python is asked if one number is greater than another, it always results in the creation of some specific data, which is a B________ v________.
George Boole
The name “boolean”comes from G________ B_______ (1815-1864).
The Laws of Thought
This work by George Boole contains the definition of Boolean algebra
Boolean algebra
A part of algebra that makes use of only two distinct values: True and False, denoted as 1 and 0
Expressions and Assignment statements
These statements are fundamental to programming.
Expression statement
This statement produces a value.
Assignment statement
This statement stores that value in a variable.
Expression
It is a combination of values, variables, operators, and function calls that result in a computed value.
building blocks
Expressions are crucial because they form the b________ b________ of logic in programming. Every expression returns a value that can be used within a program.
operands and operators
Expression is any valid combination of o________(values or variables) and o__________(such as +, -, *, /). It is evaluated by Python to produce a value.
multiple operations and function calls
Expressions can be as simple as a single number (10) or as complex as a mathematical formula involving m__________ o______________ and f________ c____.
Arithmetic Expressions
These involve mathematical operations such as addition (+), subtraction (-), multiplication (), division (/), and exponentiation (*).
Arithmetic Expressions
These expressions are used in scenarios requiring numerical computations.
Relational Expressions (or Comparison Expressions)
These evaluate to True or False using comparison operators. These utilize comparison operators like equal to (==), not equal to (!=), greater than (>), less than (
conditional statements and loops
Relational Expressions (or Comparison Expressions) are essential in decision-making processes, such as c____________ s_____________ and l____.
Comparison Expressions
Relational Expressions can also be called as what?
Logical Expressions (or Boolean Expressions)
These use logical operators (and, or, not) to combine Boolean values.
Boolean Expressions
Logical Expressions can also be called as what?
complex
Logical Expressions (or Boolean Expressions) are pivotal in constructing c________ conditional statements.
Bitwise Expressions
These manipulate bits directly using bitwise operators (&, |, ^, ~, <
AND
(&)
XOR
(^)
NOT
(~)
left shift
(<<)
right shift
(>>)
low-level
Bitwise Expressions are commonly used in l____ l________ programming, such as setting flags or manipulating binary data.
setting flags or manipulating binary data
Bitwise Expressions are commonly used in low-level programming, such as s_________ f______ or m_____________ binary data.
Assignment statements
These statements assign a value to a variable using the = operator.
= operator
An assignment statement assigns a value to a variable using the ____ operator.
Assignment statements
These statements allow the storage of values in named memory locations (variables).
variable name
The left-hand side of the assignment operator (=) is the v________ n_____
value
The right-hand side is the v____ to be stored.
Augmented Assignment Operators
These operators simplify modifying variables.
arithmetic, assignment
Augmented Assignment Operators provides a concise syntax to update variable values by combining an a_____________ operation with an a____________ operator, reducing redundancy in code.
Augmented Assignment Operators
These operators reduce redundancy in code.
+=
Augmented Assignment Operator: Addition
-=
Augmented Assignment Operator: Subtraction
*=
Augmented Assignment Operator: Multiplication
/=
Augmented Assignment Operator: Division
//=
Augmented Assignment Operator: Floor Division
%=
Augmented Assignment Operator: Modulus (Remainder)
**=
Augmented Assignment Operator: Exponentiation
&=
Augmented Assignment Operator: Bitwise AND
^=
Augmented Assignment Operator: Bitwise XOR
Augmented Assignment Operator: Bitwise Left Shift