1/103
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
floating points
the numbers handled by modern computers are of the following types:
integers
numbers devoid of the fractional part
floating points
are numbers that contain or can contain the fractional part
they differ significantly in how they are stored in computer memory and the range of acceptable values
how do integers and floating points differ?
type
the characteristic of the numeric value that determines its kind, range, and application is called the ___
true
(T/F) integer is a string od digits that make up a number and must not be interjected with any characters that are not digits
the use of underscores in numeric literals
when it comes to integers, what kind of provision does python allow?
octal and hexadecimal numbers
these are the 2 additional conventions in python that are unknown to the world of mathematics
if an integer number is preceded by an 0o prefix (zero-o)
how will we know that the number will be treated as an octal value?
digits taken from the [0...7] range only
in octal values, the number must contain digits in what range?
it is an octal number with a decimal value equal to 83
is 0o123 an octal or hexadecimal number? and what is the decimal value?
yes
does the print() function perform the conversion automatically?
if it is preceded by the prefix 0x (zero-x)
how will we know if the number will be treated as a hexadecimal value?
it is a hexadecimal number with a decimal value equal to 291
is 0x123 an octal or hexadecimal number? and what is the decimal value?
they are designed to represent and store numbers with a non-empty decimal fraction
what are floats designed to represent and store?
no, python does not accept the comma as it has a reserved meaning
does python allow the use of commas in floats?
yes, as 0.4 can be written as .4, etc. and have its type or value unchanged
is removing the zero if it is the only digit in front of or after the decimal point possible?
exponents
essentially, the point makes a number a float. but also, the letter E/e, which represents ___ incorporated into a number string such as 3E8
the exponent (the value after E) has to be an integer
the base (the value in front of the E) may be an integer
what are the guidelines when it comes to using E in floats?
6.62607E-34
the value of a physical constant called planck’s constant is 6.62607 × 10^-34. to code this, it will be formatted as what?
no, it doesn’t mean that python will present it in the same way as it may sometimes choose a different notation
will the chosen form of coding float values be presented as is by python?
it chooses the more economical form of the number’s presentation
the float literal 0.0000000000000000000001 will result in 1e-22 when run using the print() function in python. what is the reasoning behind this?
strings
these are used when processing texts and not numbers. it is incomplete without quotes (““)
escape character
in instances where words inside a string need to be quoted, the first possible solution is based on the concept of the ___, which is played by the backslash
a quote preceded by a backslash changes its meaning — it is not a delimiter but just a quote
what happens to the quote when we use a backslash?
using an apostrophe instead of a quote
the second solution when words inside a string need to be quoted
if a string opens with a quote, it must also be closed with a quote
if a string starts with an apostrophe, it must also end with an apostrophe
in using quotes and apostrophes, either of these characters may delimit strings, but it should be consistent with these 2 guidelines:
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 ___
george boole
in boolean values, the name comes from ___
the laws of thought
george boole is the author of the fundamental work ____, which contains the definition of boolean algebra
a part of algebra that makes use of only two distinct values: True and False, denoted as 1 and 0
what is the definition of Boolean algebra?
because True and False have strict denotations
why is python considered a binary reptile
true
(T/F) in boolean values, the results cannot be changed, and the symbols must be taken as they are, including case-sensitivity
an expression produces a value
an assignment statement stores that value in a variable
two reasons why expressions and assignment statements are fundamental to programming
expression
a combination of values, variables, operators, and function calls that result in a computed value
operands
the values and variables
operators
collective term for symbols like +, -, *, /
arithmetic expressions
these involve mathematical operations such as addition, subtraction, multiplication, division, and exponentiation.
are used in scenarios requiring numerical computations