About 255 results
Open links in new tab
  1. Nested conditionals

    For example, we could write a program to classify a salsa into mild, medium, hot, or extreme, based on the Scoville rating of its peppers. This flowchart describes the desired logic: We can …

  2. Nested conditionals - AP CSP (practice) | Khan Academy

    Practice using nested conditionals in programs in the AP CSP pseudocode, in this set of free practice questions designed for AP Computer Science Principles students.

  3. Nested conditionals (video) | Khan Academy

    What happens when you nest one if statement inside of another? Follow the indentation to trace the execution of a program with nested conditionals. View the program used in this video at: …

  4. Nested conditionals (video) | Khan Academy

    What happens when you nest one if statement inside of another? Follow the indentation to trace the execution of a program with nested conditionals. View the program used in this video at: …

  5. Compound Booleans: AND/OR/NOT | AP CSP (article) | Khan …

    Imagine a university wants to send a warning only to those students who are not eligible for graduation. There are a few ways to implement that logic with nested conditionals.

  6. Review: Logic and if Statements (article) | Khan Academy

    We can do things conditionally in our programs using if statements and if/else statements combined with conditional expressions. An if statement tells the program to execute a block of …

  7. Compound Booleans: AND/OR/NOT - AP CSP (practice) | Khan …

    A game programmer uses this nested conditional in their online Four Square game.

  8. Khan Academy | Khan Academy

    print("We recommend:", stardew) elif genre == "action" and play_style == "multiplayer": print("We recommend:", fortnite) # Nested conditional example elif genre == "adventure": if difficulty == …

  9. The Logic of "If" vs. "Only if" (article) | Khan Academy

    In this example, my wearing a hat is a guarantee that it is sunny. But that doesn’t mean that sunniness guarantees that I’m wearing a hat!

  10. A quick guide to conditional logic (article) | Khan Academy

    We'll provide you with some examples from actual, previously-administered LSATs. Think about how you'd translate each one into conditional logic, then click the link below to reveal the …