- Sending a Letter
In this exercise I initially wrote the following code:
if score >= 90:
elif score >= 80 and < 90:
elif score >= 70 and < 80:
elif score >= 60 and < 70:
It returned an error message in which the and was markes as invalid syntax. I added this parte beacause I tought that without it there would be an overlap of grades for each letter. i.e. 79 woul return both D and C since it is greater than 60 and 70.
The code without the and part worked and did not creat this overlap. I'd like to know why and why the former syntax was invalid.