Python provides various types of conditional statements (JNNC Technologies)



Python Conditional Statements
StatementDescription
if StatementsIt consists of a Boolean expression which results is either TRUE or FALSE followed by one or more statements.
if else StatementsIt also contains a Boolean expression. The if statement is followed by an optional else statement & if the expression results in FALSE, then else statement gets executed. It is also called alternative execution in which there are two possibilities of the condition determined in which any one of them will get executed.
Nested StatementsWe can implement if statement and or if-else statement inside another if or if – else statement. Here more than one if conditions are applied & there can be more than one if within elif.

Post a Comment

0 Comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();