1.6 KiB
Hello World
The classical introductory exercise. Just say "Hello, World!".
"Hello, World!" is the traditional first program for beginning programming in a new language or environment.
The objectives are simple:
- Write a function that returns the string "Hello, World!".
- Run the test suite and make sure that it succeeds.
- Submit your solution and check it at the website.
If everything goes well, you will be ready to fetch your first real exercise.
Installation
See this guide for instructions on how to setup your local R environment.
How to implement your solution
In each problem folder, there is a file named <exercise_name>.R
containing a function that returns a NULL
value. Place your implementation inside the body of the function.
How to run tests
Inside of RStudio, simply execute the test_<exercise_name>.R
script. This can be conveniently done with testthat's auto_test
function. Because exercism code and tests are in the same folder, use this same path for both code_path
and test_path
parameters. On the command-line, you can also run Rscript test_<exercise_name>.R
.
Source
This is an exercise to introduce users to using Exercism http://en.wikipedia.org/wiki/%22Hello,_world!%22_program
Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.