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
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
3
Q
REPL
A
Read-Eval-Print-Loop
4
Q
A