Conteúdo do Curso
Conditional Statements in Python
3. Python if-elif-else Statement
4. Python Ternary Operator
Conditional Statements in Python
Challenge: Geometric Figure
Tarefa
Let's write a simple program that will determine geometric figures depending on how many angles this figure has.
We have the following classification:
- angles = 0: Circle or ellipse;
- angles = 3: Triangle;
- angles = 4: Square, rectangle or rhombus;
- angles > 4: Polygon;
- in other cases: It is not a geometric figure.
Tudo estava claro?
Seção 2. Capítulo 3
Conteúdo do Curso
Conditional Statements in Python
3. Python if-elif-else Statement
4. Python Ternary Operator
Conditional Statements in Python
Challenge: Geometric Figure
Tarefa
Let's write a simple program that will determine geometric figures depending on how many angles this figure has.
We have the following classification:
- angles = 0: Circle or ellipse;
- angles = 3: Triangle;
- angles = 4: Square, rectangle or rhombus;
- angles > 4: Polygon;
- in other cases: It is not a geometric figure.
Tudo estava claro?
Seção 2. Capítulo 3