Question 3
Back to Exercise
What is the output of the following Python program?
import math as m
print(m.__name__, hasattr(m, "tau"), round(m.tau, 2), type(m).__name__)
- A m True 6.28 module
- B math False 6.28 module
- C math True 6.28 module Correct
- D math True 6.28 math
Correct Answer: Option C
The alias is just another name for the same module object, whose __name__ is still "math". tau is 2π.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!