dimanche 1 décembre 2019

Why am I getting this message invalid syntax?

i write code if statement but there is a wrong in it . this is the code

mark = float(input('enter your mark : '))
if mark < 50:
    result = 'failed'
elif mark >= 50 and < 75:
    result = 'accepted'
elif mark >= 75 and < 85:
    result = 'good'
elif mark >= 85 and < 90:
    result = 'very good'
else:
    result = 'excellent'
print(result)

the message appear is invalid syntax in line 4 about < assignment any help here guys?

Aucun commentaire:

Enregistrer un commentaire