Comparison operators
📖 Scenario: You are helping a store manager compare product prices to decide which items are cheaper or more expensive.
🎯 Goal: You will write a Ruby program that uses comparison operators to compare product prices and print the results.
📋 What You'll Learn
Create a hash with product names and their prices
Create a variable with a price threshold
Use comparison operators to check if each product price is less than, equal to, or greater than the threshold
Print the comparison results
💡 Why This Matters
🌍 Real World
Stores often compare product prices to decide discounts or promotions.
💼 Career
Understanding comparison operators is essential for decision-making logic in programming jobs.
Progress0 / 4 steps