Menu
Coddy logo textTech

Welcome Message

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

challenge icon

Challenge

Easy

In this chapter, you'll build a Bill Split Calculator that helps divide restaurant bills among friends.

Display a welcome message for the calculator using cat(). The output should be exactly:

Welcome to the Bill Split Calculator!
Let's split your bill fairly.

Make sure each line appears on its own line by embedding the newline character \n inside the string itself, like this:

cat("first line\nsecond line\n")

Important: Do not pass \n as a separate argument to cat(). When you write cat("text", "\n"), R inserts a space before the \n, which produces extra spaces in the output and will not match the expected result.

Try it yourself

# TODO: Write your code below
# Use cat() to display the welcome message
# Remember to use \n for new lines

All lessons in Fundamentals