Lektion 6 af 10
Betingelser
Brug if, elif og else til beslutninger. Python bruger ordene and, or og not til logik.
PYTHON
score = 85
if score >= 90:
print("Grade A")
elif score >= 80:
print("Grade B")
elif score >= 70:
print("Grade C")
else:
print("Grade D")
# Combined condition
if score >= 60 and score < 70:
print("Almost there")