Python Flow Control: If-else and Loop with practical examples

## if…else Statement In Python

In the computer programming, the `if` statement is a contingent statement. It is used to conduct a block of code only when a appointed condition is met. For example

If we need to assign several grades to students based on their scores.

1. If a student scores upon **90**, assign grade **A**
2. If a student scores upon **75**, assign grade **B**
3. If a student scores upon **65**, assign grade **C**

This conditional tasks can be achieved using the `if

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top