The elif Statement, Basic Computer Science


The elif statement permits you to check multiple expressions for truth value and execute a block of code the moment one of the conditions estimates to true.
similar to the else, the elif statement is optional. Though, unlike else, for which there can be at most one statement, there can be an arbitrary number of elif statements next an if.
The syntax of the if...elif statement is:
if expression first:
statement(s)
elif expression second:
statement(s)
elif expression third:
statement(s)
else:statement(s)
Posted Date: 5/5/2012 4:19:02 AM | Location : United States







Related Discussions:- The elif Statement, Assignment Help, Ask Question on The elif Statement, Get Answer, Expert's Help, The elif Statement Discussions

Write discussion on The elif Statement
Your posts are moderated
Related Questions
Conditional statement: An If statement is composed of three parts. The first part should be keyword w.r.t language to convey to the computer that it is if statement. And a Bo

Two dimensional Arrays:  A two-dimensional array is like a table, with a defined number of rows, where each row has a defined number of columns. In some instances we need to  hav

I WANT TO CONNECT A PC WIYH MY PC THROUGH REMOTE DESKTOP. WHAT I DO TELL ME PLEASE

Create an implementation of the Ordered Associative Array API using left-leaning red-black trees. Illustrate the use of the API by refactoring your WordBench as a client of Ordered

Question 1: (a) Initially, human information processing was believed to occur in 4 distinct stages. State and describe each of those stages. (b) What are the 3 types of

Artificial Intelligence Agents In the earlier teach, we discussed what we will be talking about in Artificial Intelligence and why those tasks are important. This lecture is all

#queswhat computers can do tion..

QUESTION (a) Consider a system with input x[n] and output y[n] that satisfy the difference equation:                                   Y[n] = x[n] + 0.5 x[n-2] + 0.2 x[n+1]

QUESTION a) Cryptography is a set of techniques and mathematical algorithms. Describe four important areas where cryptography must be applied b) What is the importance of us

Consider the one-time pad encryption scheme to encrypt a 1-bit message m, and assume m is chosen with uniform distribution from message space M={0,1}. Let E1 be the event "message