Menu
Coddy logo textTech

Recap - Variable Creation

Part of the Fundamentals section of Coddy's Ruby journey — lesson 10 of 88.

challenge icon

Challenge

Easy

Create variables representing different aspects of a product inventory system. You need to create exactly four variables, each with a different data type.

First, create a variable called product_price and assign it the value 29.99. Then create a variable called item_count and assign it the value 150. Next, create a variable called product_name and assign it the value "Wireless Headphones". Finally, create a variable called in_stock and assign it the value true.

After creating all four variables, display each one using the puts command in this exact order: product_price, item_count, product_name, and in_stock.

Try it yourself

# TODO: Create the four variables with their assigned values

# TODO: Display each variable using puts command in the specified order

All lessons in Fundamentals