Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Geometric Figure | Python if-else Statement
Conditional Statements in Python
course content

Course Content

Conditional Statements in Python

Conditional Statements in Python

1. Python if Statement
2. Python if-else Statement
3. Python if-elif-else Statement
4. Python Ternary Operator

bookChallenge: Geometric Figure

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 3
toggle bottom row

bookChallenge: Geometric Figure

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 3
toggle bottom row

bookChallenge: Geometric Figure

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 2. Chapter 3
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt