Tagged: nested-if
Everything tagged "nested-if", newest first.
Python Coding Exercise #41: Alphabetically in the Middle
A beginner Python exercise on comparing strings and chained comparisons — find which of three letters would be in the middle in alphabetical order, and compare a chained-comparison solution with a nested if solution.
Python Coding Exercise #40: Leap Year
A beginner Python exercise on if, elif and else with the remainder operator — decide whether a year is a leap year, handle the century-year exception, and compare a flat chain of conditions with a nested if.