Aan de slagGa gratis aan de slag

Logical testing

Let's practice writing logical statements and displaying the output.

Recall that we use the following operators:

  • == tests that two values are equal.
  • != tests that two values are not equal.
  • > and < test that greater than or less than, respectively.
  • >= and <= test greater than or equal to or less than or equal to, respectively.

Deze oefening maakt deel uit van de cursus

Introduction to Data Science in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Is height_inches greater than 70 inches?
print(____ ____ 70)
Code bewerken en uitvoeren