Question 1 of 30
In a software application designed to manage user accounts, a developer is implementing a function that updates user information. The function should raise an exception if the provided user ID does not exist in the database. The developer writes the following code snippet:
python
update_user_info(user_id, new_info):
user_id not in database:
se ValueError("User ID does not exist.")

Preparing for Microsoft 98-381 Introduction to Programming Using Python? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free