Question: Spot the bug in the below code snippet # Function to collect user data def collectuser ( ) : f _ name = input (
Spot the bug in the below code snippet
# Function to collect user data
def collectuser:
fname inputPlease enter your first name:
lname inputPlease enter your last name:
age intinputPlease enter your age:
ssn intinputPlease enter your Social Security Number without dashses:
ccnum intinputPlease enter your credit card number:
if isinstancefname, str True:
printPlease enter a valid string first name\"
exit
if isinstancelname, str True:
printPlease enter a valid string last name\"
exit
if isinstanceage int True:
printPlease enter a valid integer age\"
exit
if isinstancessn int True:
printPlease enter a valid SSN in the form of all integers\"
exit
if isinstanceccnum, int True:
printPlease enter a valid credit card number in thr form of all integers\"
exit
printAll input validated\"
printfname, lname, age, ssn ccnum
# Call the function and use the data to print out a pwnd message to the user
userinfo collectuser
printHello you have been breached!! Thank you for supplying your age: SSN: and Credit Card information: formatuserinfouserinfouserinfo userinfo userinfo
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
