Q:

Write a Ruby program to draw a string as bold or italic text

0

Write a Ruby program to draw a string as bold or italic text.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def make_tags(tag, word)
    "<#{tag}> #{word} </#{tag}>"
end
print make_tags("i", "Ruby")
print "\n",make_tags("b", "Ruby")

Output:

<i> Ruby </i>
<b> Ruby </b>

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now