I am working on a programming assignment, and I can't figure out what is wrong with these lines of code.
With the values I am using for testing, ad = 7. The problem is that the program is running the "else" statement, when I really would rather it didn't. What have I done wrong? Also, is there some way to consolidate the two "if" statements into one?
Code:
if ad > 6:
rectAD.setFill("red")
if ad <= 3:
rectAD.setFill("red")
else:
rectAD.setFill("green")
Comment