๐Ÿ PyQuest๐Ÿค” Making Decisions ยท โš–๏ธ True or False?
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

True or False? โš–๏ธ

Python can answer questions. Not big life questions โ€” but questions like "is this bigger than that?" It always answers with True or False.

print(10 > 3)      # โžœ True   (> means "greater than")
print(2 > 100)     # โžœ False
print(5 == 5)      # โžœ True   (== means "is equal to")
print(5 != 5)      # โžœ False  (!= means "is NOT equal to")

โš ๏ธ Watch out for the sneakiest thing in all of Python:

  • one equals sign = means store this (cookies = 12)
  • two equals signs == means is this the same? (cookies == 12)

True and False are a brand new kind of value called a boolean. They're not text, so they never get quotes.

Your mission

  1. Make a variable cookies and store a number in it
  2. Print at least 3 comparisons about cookies (use >, <, ==, !=)
  3. Make at least one of them come out True and one come out False

Your code

Press โ–ถ Run to see what your code does!