The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #342
import math
print(math.copysign(-1, -1))
math.copysign() returns a float with the absolute value of x but the sign of y. (docs.python.org/3/library/math.html)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) October 11, 2020
import math
print(math.copysign(-1, -1))
-1
1
It will throw a TypeError error.
0#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: