Menu
Coddy logo textTech

Recap - Variable Creation

Part of the Fundamentals section of Coddy's R journey — lesson 11 of 78.

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 150L. 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 print() function 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 print() function in the specified order

All lessons in Fundamentals