Quiz
Python If/Else Quiz
…beginner quiz on Python if, elif and else: 15 questions on conditions, comparison and logical operators and indentation, with instant answers.
Showing 1–10 of 18
Quiz
…beginner quiz on Python if, elif and else: 15 questions on conditions, comparison and logical operators and indentation, with instant answers.
Challenge
…check reports WARN for a reading of 63 because its elif conditions are in the wrong order, so CRITICAL can never run. Predict it, find the dead branch, fix the order, then write a four-level chain.
Challenge
…GO. With today's reports: Launch: GO Join the three conditions with and . lightning is True or False, so not lightning means "no lightning". "Under 30" means 30 itself is too much. Why it's on hold…
Quiz
Free beginner quiz on Python while loops: 15 questions on conditions, counters, infinite loops, break and continue, with instant answers.
Example
Multiple conditions with elif. Checking several possibilities in sequence.
Challenge
…a docking check built from three nested ifs into one condition joined with and, keeping the output exactly the same, then rewrite it as a flat if/elif chain that reports the first check that failed.
Quiz
…precedence Strings: indexing, slicing and string methods Conditions: if , elif , else and truthy values Lists, tuples, dictionaries and sets Loops with range() , break and continue Functions: default…
Challenge
An oxygen check uses = instead of == and has a line that isn't indented, so Python refuses to run it. Predict what happens, fix both errors one after the other, then write an if/else check yourself.
Challenge
…With the battery at 18%: Safe mode: ON Join the two conditions with or . "Under 20" and "over 10" don't include 20 and 10 themselves. Which rule fired The ground team needs to know why. Store each…
Quiz
…straight away, and returning one of two values with a conditional expression How it works 15 questions: 11 with one correct answer, 4 where you select every correct answer After each question you see…