Link#Mastery15 #Mastery16 y #Mastery18 #TC1017
This post is about mastery number 18. The use of nested conditionals. I explained a simple example in the next video but I would also like to share other resources such as tutorialspoint.com’s exlanation of nested conditionals. My video: Take a look to it. http://www.tutorialspoint.com/cplusplus/cpp_nested_if.htm Another video I watched is about if/else interaction […]
Nesting of conditional statements
Here is the link for my video:
Nesting conditionals 🙂
Thanks for the help #MarinaRuelas
Hello this is #Mastery18 of nesting statements. It is possible to nest if-else else statements; this means you can use this means using functions one inside another.
96
Normal
0
21
false
false
false
ES-TRAD
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:”Tabla normal”;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:””;
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:Calibri;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
How to write a nested statement?
For example, the syntax is the following…
If (expression 1) {
If(expression 2) {
}
}
You can also nest an else if… else in a similar way as you nested the if statement.
This type of statement allows a choice to be made between two alternatives. A choice must be made between more than two possibilities. For example, the sign function in mathematics returns a negative number if an argument is less than zero, returns a positive number if the argument is more than zero.
I took this chart from http://www.programiz.com/sites/tutorial2program/files/flowchart-if-programming_0.jpg
That explains a process for an if statement that also can be used nested.
This program shows an example on how to use a nested statement and how it works.
WATCH MY VIDEO https://youtu.be/hT153pKWogI
Mastery 18 – Nesting of conditional statements Here’s WSQ 09, in which I use nesting of conditional statements. Mastery 22 -When to use what type of repetitions on a program. There are two types of loops in Python, while and for loops, when you want to make a repetition indefinite number of times to use […]
Nesting of conditional statements