Well done!
You have completed Arguments, Parameters, and Mutability Quiz!
Quiz Question 1 of 5
If you wanted to modify the print_welcome
function to validate that the name
parameter is not empty before printing, which modification would be appropriate?
def print_welcome(name):
if name:
print(f"Welcome {name}!")
else:
print("Error: Name cannot be empty.")
Choose the correct answer below: