Nesting of conditional statements


Nesting of conditional statements

Nesting of conditional statements

At this point we already know how to use conditionals, but we can have one conditional inside the other. This is in order to have several options of answers of the program in use, or many other options.
This is very useful because with only con conditional there’s no much place to work, but you can add as many conditions as you want to your code, and the posibilities are huge.
In my example there are two conditions, one to let you know that you passed, and the other, in case your grade is above 9 points, it congratulates you.
It’s very easy to do and it will be coming handy.

CC BY 4.0 Nesting of conditional statements by Salvador García is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.