PL Prefinals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/103

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:09 PM on 4/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

104 Terms

1
New cards
  • integers

  • floating points

the numbers handled by modern computers are of the following types:

2
New cards

integers

numbers devoid of the fractional part

3
New cards

floating points

are numbers that contain or can contain the fractional part

4
New cards

they differ significantly in how they are stored in computer memory and the range of acceptable values

how do integers and floating points differ?

5
New cards

type

the characteristic of the numeric value that determines its kind, range, and application is called the ___

6
New cards

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

7
New cards

the use of underscores in numeric literals

when it comes to integers, what kind of provision does python allow?

8
New cards

octal and hexadecimal numbers

these are the 2 additional conventions in python that are unknown to the world of mathematics

9
New cards

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?

10
New cards

digits taken from the [0...7] range only

in octal values, the number must contain digits in what range?

11
New cards

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?

12
New cards

yes

does the print() function perform the conversion automatically?

13
New cards

if it is preceded by the prefix 0x (zero-x)

how will we know if the number will be treated as a hexadecimal value?

14
New cards
15
New cards

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?

16
New cards

they are designed to represent and store numbers with a non-empty decimal fraction

what are floats designed to represent and store?

17
New cards

no, python does not accept the comma as it has a reserved meaning

does python allow the use of commas in floats?

18
New cards

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?

19
New cards

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

20
New cards
21
New cards
  • 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?

22
New cards

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?

23
New cards

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?

24
New cards

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?

25
New cards

strings

these are used when processing texts and not numbers. it is incomplete without quotes (““)

26
New cards

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

27
New cards

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?

28
New cards

using an apostrophe instead of a quote

the second solution when words inside a string need to be quoted

29
New cards
  • 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:

30
New cards

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 ___

31
New cards

george boole

in boolean values, the name comes from ___

32
New cards

the laws of thought

george boole is the author of the fundamental work ____, which contains the definition of boolean algebra

33
New cards

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?

34
New cards

because True and False have strict denotations

why is python considered a binary reptile

35
New cards

true

(T/F) in boolean values, the results cannot be changed, and the symbols must be taken as they are, including case-sensitivity

36
New cards
  • 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

37
New cards

expression

a combination of values, variables, operators, and function calls that result in a computed value

38
New cards

operands

the values and variables

39
New cards

operators

collective term for symbols like +, -, *, /

40
New cards

arithmetic expressions

these involve mathematical operations such as addition, subtraction, multiplication, division, and exponentiation.

are used in scenarios requiring numerical computations

41
New cards
42
New cards
43
New cards
44
New cards
45
New cards
46
New cards
47
New cards
48
New cards
49
New cards
50
New cards
51
New cards
52
New cards
53
New cards
54
New cards
55
New cards
56
New cards
57
New cards
58
New cards
59
New cards
60
New cards
61
New cards
62
New cards
63
New cards
64
New cards
65
New cards
66
New cards
67
New cards
68
New cards
69
New cards
70
New cards
71
New cards
72
New cards
73
New cards
74
New cards
75
New cards
76
New cards
77
New cards
78
New cards
79
New cards
80
New cards
81
New cards
82
New cards
83
New cards
84
New cards
85
New cards
86
New cards
87
New cards
88
New cards
89
New cards
90
New cards
91
New cards
92
New cards
93
New cards
94
New cards
95
New cards
96
New cards
97
New cards
98
New cards
99
New cards
100
New cards