computer science Flashcards

1
Q

what are the 5 primitive data types in python?

A

integer, float/real, character, boolean and string

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

what does an integer data type store

A

whole numbers

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

what do float/real data types store?

A

numbers with decimals

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

what do boolean data types store?

A

true or false

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

what does the character data type store?

A

a single character

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

what type of error do you encounter when you use the wrong data type?

A

a type error

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

In sign and magnitude if the MSB is 0 what is the number

A

positive

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

what does MSB stand for?

A

Most Significant Bit

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

In sign and magnitude if the MSB is 1 what is the number

A

negative

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

In twos compliment if the MSB is 0 what is the number

A

positive

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

In twos compliment if the MSB is 1 what is the number

A

negative

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

What is the the biggest possible number able to be represented in two compliment?

A

+127

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

What is the the smallest possible number able to be represented in two compliment?

A

-128

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