Write a function called getYearOfBirth that prompts the user to enter their year of birth as a four-digit number, and returns the year entered. The function should throw a ValueError exception if the entered number is not within the range 1900 to the present year. Write a program that call this function, and keeps calling it until a valid year has been entered.
Correct Answer:
Verified
Q48: The section of code making a call
Q49: An exception handler is the section of
Q50: Which of the following is not a
Q51: An exception is a value (object) that
Q52: The predefined exceptions in Python are called
Q53: The expression 'Hello' + 10 would raise
Q54: The expression int('10A') would raise a _
Q55: 55. The section of code that is
Q56: Give section of code that prompts the
Q57: Write a function called getNum(start, end) that
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents