DEMO: A logical operator is a Python keyword that lets you join multiple conditionals in one line!

Testing more than one conditional at once is called using a compound conditional.

The Keyword: if·tom_pick·==·"rock"·and·alice_pick·==·"rock": The Python logical operator and joins these two conditionals and tests them together!

  • Click Run to learn more about compound conditionals and when the code beneath them runs!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)