Compare The Following Two Python Codes Shown Below And State #1182
Compare the following two Python codes shown below and state the output if the input entered in each case is -6?</p> <pre><code class="language-python">CODE 1 import math num=int(input("Enter a number of whose factorial you want to find")) print(math.factorial(num)) CODE 2 num=int(input("Enter a number of whose factorial you want to find")) print(math.factorial(num))</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Exception Handling - Python Exception Handling - Quiz No.4.
Compare the following two Python codes shown below and state the output if the input entered in each case is -6?
CODE 1 import math num=int(input("Enter a number of whose factorial you want to find")) print(math.factorial(num)) CODE 2 num=int(input("Enter a number of whose factorial you want to find")) print(math.factorial(num))
ValueError, NameError
AttributeError, ValueError
NameError, TypeError
TypeError, ValueError