45.
What will be the output of the following Python code if the input entered is 6?
valid = False
while not valid:
    try:
        n=int(input("Enter a number"))
        while n%2==0:
            print("Bye")
        valid = True
    except ValueError:
        print("Invalid")

46.
What is the purpose of the sys.exc_info() function in Python?

47.
What will be the output of the following Python code?
def foo():
    try:
        return 1
    finally:
        return 2
k = foo()
print(k)

48.
What will happen if an exception is raised in a try block and is not handled in any of the except blocks?

50.
Which of the following statements is true?