In: Computer Science
relationship=input('Enter the relationship status: ') #taking
input from user
income=int(input('Enter the income of the user: '))
if relationship.lower()=="single":
income>=30000:
rate=0.25
else:
rate=0.1
if relationship.lower()=="married": #function to covert upper case
to lower case,in case user gives the input in caps
if income>=60000:
rate=0.25
else:
rate=0.1
tax=income*rate
print("Status: {}\nIncome: {}\nTax:
{}".format(relationship,income,tax))
Fix this code so it prit out married or single status and the user income
income=int(input('Enter the income of the user: '))
#missed reading the relationship value
relationship=input("Enter relationship (single or married): ")
if relationship.lower()=="single":
if income>=30000:
rate=0.25
else:
rate=0.1
if relationship.lower()=="married": #function to covert upper case to lower case,in case user gives the input in caps
if income>=60000:
rate=0.25
else:
rate=0.1
tax=income*rate
print("Status: {}\nIncome: {}\nTax: {}".format(relationship,income,tax))

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me