Exercise 1: Concatenate Substrings

Concatenate strings together.

Problem statement

In the widget below, you’re given a String variable called input_string. Concatenate three occurrences of <3 at the end of this input string. Don’t forget to store the resulting string in result!

Note: Write your code starting at line 4.

Example

input_string = "ruby"
result = "ruby<3<3<3"

Try it yourself

Press + to interact
def string_producer(input_string)
result = ""
# Start your code here
return result
end