Onversions Flashcards

1
Q

Functions are used to convert Data types

A

Functions are used to convert Data types

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

Inputs from the user are strings

A

Inputs from the user are strings

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

int(s)

A

Converts a string (s) to an integer

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

float(s)

A

Converts a string (s) to a number with a decimal point

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

str (x)

A

Converts an integer or floating point number (x) to a string

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

bool(s)

A

Converts a string (e.g. “True”) to a Boolean

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

ord()

A

converts a character into its numerical ASCII value.

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

chr()

A

converts a numerical ASCII value back into its corresponding character.

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