Notebook 4: Floating Point Flashcards

1
Q

ord()

A

returns the number representing the unicode value of a character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

isalpha()

A

returns true if all characters in string are alphabet letters a-z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

floating point representation

A

Value=Sign × Significand × Base^Exponent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

floating point representation - sign

A

indicates if number is positive or negative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

floating point representation - significand (Mantissa)

A

represents the precision of the number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

floating point representation - base

A

the base of the number. 10 for regular numbers and 2 for computers usually

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

floating point representation - exponent

A

determines the scale of the number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

hex format

A

a way of representing numbers using a base of 16, or hexadecimal
ex:
‘-0x1.4002000000000p+10’

sign of the number is first
prefix 0x that means it’s hexadecimal notation
1.4002…. is the significand in base-16 (hexadecimal)
p+ means power of 2 and the following number tells us how many places to shift the significand + scales the number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

strip()

A

In Python, the strip() method is used to remove leading and trailing characters from a string. By default, it removes whitespace characters (spaces, tabs, newlines, etc.).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

lstrip / rstrip

A

In Python, lstrip() and rstrip() are string methods used to remove leading and trailing characters from a string, respectively.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

list slicing

A

list_name[start : end : step]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly