Hello World in R Programming Language

Our first program will print the classic “hello world” message. Here’s the full source code.

# This is a simple Python program that prints "hello world"
def main():
    print("hello world")

if __name__ == "__main__":
    main()

To run the program, save the code in a file named hello_world.py and then use the python command.

$ python hello_world.py
hello world

In Python, there isn’t a need to build or compile the program into binaries. You simply run the script directly using the Python interpreter.

Now that we can run basic Python programs, let’s learn more about the language.