Skip to content

Grade by score

Python if / elif / else

Same task in: PHPGo

Flowchart (ISO 5807)

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

Source code

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

The editor opens with this code — change it and the chart redraws.

Language
Python
Constructs
if / elif / else
Topic
Branching
Formats
Word, Visio, draw.io, PDF, SVG

Related examples