Question: I need to fix this syntax error with the python3.x below syntax error with the script: UnboundLocalError: local variable 'MedRent' referenced before assignment def somework(RentLevel):

I need to fix this syntax error with the python3.x below

syntax error with the script:

UnboundLocalError: local variable 'MedRent' referenced before assignment

def somework(RentLevel): if 0

RentLevel = "Low" return RentLeve1 elif 700 < MedRent <=1000:

MedRent = "Med"

elif MedRent > 1000:

RentLevel = "High"

else:

RentLevel = "Unknown"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!