0
0
Rubyprogramming~10 mins

What is Ruby - Hands-On Activity

Choose your learning style9 modes available
What is Ruby
📖 Scenario: Imagine you want to learn a programming language that is easy to read and write, just like talking to a friend. Ruby is one such language, popular for building websites and apps.
🎯 Goal: You will create a simple Ruby program that introduces Ruby by storing a description in a variable and then printing it out.
📋 What You'll Learn
Create a variable called ruby_description with the exact text: "Ruby is a simple and powerful programming language."
Create a variable called language_type with the exact text: "dynamic and object-oriented"
Use string interpolation to create a new variable called full_description that combines ruby_description and language_type in the sentence: "Ruby is a simple and powerful programming language. It is dynamic and object-oriented."
Print the full_description variable
💡 Why This Matters
🌍 Real World
Ruby is used to build websites, apps, and automate tasks because it is easy to read and write.
💼 Career
Knowing Ruby helps you work on web development jobs, especially with popular frameworks like Ruby on Rails.
Progress0 / 4 steps
1
Create the initial description variable
Create a variable called ruby_description and set it to the exact string "Ruby is a simple and powerful programming language."
Ruby
Need a hint?

Use = to assign the string to the variable ruby_description.

2
Add a variable for language type
Create a variable called language_type and set it to the exact string "dynamic and object-oriented"
Ruby
Need a hint?

Assign the string to the variable language_type using =.

3
Combine the descriptions using string interpolation
Create a variable called full_description that uses string interpolation to combine ruby_description and language_type into the sentence: "Ruby is a simple and powerful programming language. It is dynamic and object-oriented."
Ruby
Need a hint?

Use "#{variable}" inside a double-quoted string to insert variable values.

4
Print the full description
Write a puts statement to print the full_description variable
Ruby
Need a hint?

Use puts full_description to display the combined sentence.