What will be the output of the following Python code?
def getMonth(m):
if m<1 or m>12:
raise ValueError("Invalid")
print(m)
getMonth(6)
def getMonth(m):
if m<1 or m>12:
raise ValueError("Invalid")
print(m)
getMonth(6)A. ValueError
B. Invalid
C. 6
D. ValueError("Invalid")
Answer: Option C

Join The Discussion