Question: Fix Input Validation in code please. Here is my code: while True: try: name = str ( input ( ' What is your first name?
Fix Input Validation in code please.
Here is my code:
while True:
try:
name strinputWhat is your first name?
break
lastName strinputWhay is your last name?
break
except ValueError:
printPlease do not use any symbols'
printHello name, lastName
Please make it so if user inputs a symbol, the error message "Please do not use any symbols" pops up As of now, I am getting the error but it's not printing the message.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
