Back to Sessions

Session 1

1 lesson completed

Comparison Operator Evaluations

Completed

Assignment

Create the following variables using comparison operators. Return them in this order: is_mustang_edward_same, is_alphonse_edward_same, is_winry_alphonse_same. The context of the parameter names should tell you how to make these comparisons.

Solution

def compare_heights(edward_height, alphonse_height, winry_height, mustang_height):
    is_mustang_edward_same = mustang_height == edward_height
    is_alphonse_edward_same = alphonse_height == edward_height
    is_winry_alphonse_same = winry_height == alphonse_height
    return is_mustang_edward_same, is_alphonse_edward_same, is_winry_alphonse_same

Concept

Booleans (True/False), comparison operators (==, >, etc.), storing comparison results in variables, returning multiple values

How it went

Good understanding. Deliberately testing Zed AI workflow — attempted first, used AI to explore, then solved solo on boot.dev. Traced through count_posts carefully after a hint and corrected the count = 1 bug himself.

Ratings

Concept grasp: Solid
Independent attempt: Needs work
Asking good questions: Good
Debugging instinct: Developing well

Key takeaways

  • Always attempt first — a failed attempt teaches more than a correct answer you didn't earn
  • Use AI as a tutor, not a solution machine: attempt → get stuck → ask AI to explain → solve it yourself
  • Run your code early and often — trains you to read error messages, a core backend skill