Loops and conditional expression

i have a problem in conditional expression and loops

1 Like

@Pyash3721 A conditional expression in Python is an expression (in other words, a piece of code that evaluates to a result) whose value depends on a condition.

To make it clearer, here is an example of a Python expression:

3 + 4 * 5
The code 3 + 4 * 5 is an expression, and that expression evaluates to 23.

1 Like

A loop is an instruction that repeats multiple times as long as some condition is met.



There are three types of loop: -

  1. For loop
  2. While loop
  3. Nested loop
1 Like