True if it is 20 but 10 we wear a jacket false wear

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: otherwise, the block is just skipped • In either case, the <next statement> is executed akerwards 18 6 13 ­09 ­16 Example – if without else 19 Handling mulGple cases with elif • When we have mul=ple cases we can use elif (which means else ­if) if BOOLEAN EXPRESSION1 : BLOCK1 elif BOOLEAN EXPRESSION2 : BLOCK2 • Seman=cs: the block elif BOOLEAN EXPRESSION3 : corresponding to the first BLOCK3 expression that evaluates … to true is executed else : BLOCKn • The else block is op=onal <next stat...
View Full Document

Ask a homework question - tutors are online