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
Arithmetic and Logic Unit: The Arithmetic and Logic Unit is that part of the CPU that actually performs arithmetic and logical operations on data. The CU, CPU registers and me

I n t e rnal Structure of Agents We have looked at agents in terms of their external influences and behaviors: they take input from the environment and perform rational act

access,excel and ms word/

create a flowchart showing average score for the 3 quizzes assume that there are 3 sections each having 5 students the only valid number to be entered is 1-100 for the quizzes shou

Question 1: (a) Describe the three ways of classification of Database management systems (DBMS). (b) Why are System Analysts and Database Administrators needed in compa

History of E-mail: Internet based E-mail system was designed by a Computer engineer - Ray Tomlinson in late 1971 while working with ARPANET. Tomlinson used a file transfer pro

Server Programs:   Server programs are dedicated computer programs that run as services and serve the needs or requests of other programs. These services may run on a dedicated

Ask queYou are hired as a Chief Technology Officer (CTO) of a startup company, which has two branches; one Los Angeles and one in San Francisco. The company hired employees to begi

1. In each of the following situations, indicate whether f = O(g), or f = O(g), or both (in which case f = T(g)). Briefly explain why. (a) f(n)=10n5 +8n2,g(n)=20n4 +7n3 +300 (b) f

I need someone to help me with my Unix/Linux homework.