1.

What will be the output of print(math.factorial(4.5))?(a) 24(b) 120(c) error(d) 24.0The question was posed to me in an interview for job.Query is from Math in section Mapping Functions and Modules of Python

Answer»

Right choice is (C) error

The EXPLANATION is: FACTORIAL is only DEFINED for non-negative INTEGERS.



Discussion

No Comment Found

Related InterviewSolutions