string ruby

# Step 1: Define a string variable named 'original_string' with a value.
original_string = "Hello, World!"

# Step 2: Print the original string to the console.
puts "Original String: #{original_string}"

# Step 3: Convert the string to uppercase and assign it to 'uppercase_string'.
uppercase_string = original_string.upcase

# Step 4: Print the uppercase string to the console.
puts "Uppercase String: #{uppercase_string}"

# Step 5: Convert the string to lowercase and assign it to 'lowercase_string'.
lowercase_string = original_string.downcase

# Step 6: Print the lowercase string to the console.
puts "Lowercase String: #{lowercase_string}"

# Step 7: Check if the original string contains the substring 'World'.
contains_world = original_string.include?("World")

# Step 8: Print the result of the check to the console.
puts "Contains 'World': #{contains_world}"

# Step 9: Replace 'Hello' with 'Hi' in the original string and assign it to 'modified_string'.
modified_string = original_string.gsub("Hello", "Hi")

# Step 10: Print the modified string to the console.
puts "Modified String: #{modified_string}"