I am having syntax errors on the below code and can't determine why. Additionally, if I comment out the elif
statements, my line 12 does not actually add the variables together.
#Define variables and collect inputs
points = int(input("How many points do you have?: "))
years = int(input("How many years have you been a customer?: "))
points_discount = float()
years_discount = float()
final_discount = float()
#formula for additional discount
final_discount = points_discount + years_discount
#if statements for the points
if points <= 50:
points_discount == 0.00
elif points > 50 and <= 100: # SyntaxError here.
points_discount == 0.10
elif points >100 and <=200:
points_discount == 0.20
elif points >200 and <=300
points_discount == 0.25
else:
points_discount == 0.30
#if statement for the years as a customer
if years < 5:
years_discount == 0.00
else:
years_discount == 0.05
print(str(final_discount), " is your discount")