Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
Sometimes there are more than two possibilities and we need more than
two branches. One way to express a computation like that is a
Activity: CodeLens 4.5.1 (cndtnl_elif)
elif is an abbreviation of “else if.” Again, exactly one
branch will be executed.
There is no limit on the number of elif statements. If
there is an else clause, it has to be at the end, but there
doesn’t have to be one.
Activity: CodeLens 4.5.2 (cndtnl_elif2)
Each condition is checked in order. If the first is false, the next is
checked, and so on. If one of them is true, the corresponding branch
executes, and the statement ends. Even if more than one condition is
true, only the first true branch executes.
Q-3: What will the following code print if x = 3, y = 5, and z = 2?