Unit 2 Flashcards

(18 cards)

1
Q

the ord() does:

A

Gives back the unicode values of the inputted character

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

The part of your code where the handling of an exception takes placed should be placed inside:

A

the except: branch

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

What is true?

A

A. Different exception: branches MUST have unique exception names

B . you can use multiple except: branches to handle multiple exceptions coming from the same try: branch

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

When an exception occurs, we say that it has been:

A

raised

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

Which of the approachable except: branches is taken into consideration when an exception occurs?

A

the first matching branch

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

An assertion can be used to:

A

stop the program when some data have improper values

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

A code point is:

A

a number which makes up a character

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

isalnum() check if a string contains only letter and digits, and this is:

A

a method

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

the expression

“mike” > “Mike”

is:

A

True

True because with string comparisons they compare the Unicode values of the first letters

“m” code point is l09
“M” code point is 77

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

The += operator, when applied to string, performs:

A

concatenation

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

ASCII is short for what?

A

American Standard Code for Information Interchange

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

l18N is short for what?

A

internationalization

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

what is Unicode?

A

Unicode assigned unique characters to millions of code points

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

UCS-4

A

Universal character set with 4 bytes

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

UTF-8

A

Unicode transformation format

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

The chr() does:

A

gives back the letter or symbol unicode equivalent to the number provided