New Developments in Python Flashcards

1
Q

Question

// first version
from typing import Any
mydict: Dict[Any, int] = {‘Age’: 34}
// second version
from typing import Any
mydict: Dict[Any, int] = {‘Age’, ‘Thirty-Four’}

You are running the code in the first version of this program. This code works fine. However, what will the result be if you modify your code to use the second version?

A

No error will be thrown - type checking is not enforced by the interpreter

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

Which is the recommended syntax for a constant representing an interest rate?

Instruction: Choose the option that best answers the question.
Answer Choices

interestRate

_interestrate

interestrate

INTEREST_RATE

A

INTEREST_RATE

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

REPL

A

Read-Eval-Print-Loop

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