← All examples

Grade by score

Python Branching

if / elif / else

Flowchart (ISO 5807)

YesNoYesNoStartInput scorescore >= 90Output «Відмінно»score >= 60Output «Задовільно»Output «Незадовільно»EndFigure 1 — grade

Source code

def grade(score):
    if score >= 90:
        print("Відмінно")
    elif score >= 60:
        print("Задовільно")
    else:
        print("Незадовільно")