Writing a Hello World Program as a First Step in Learning a New Language

Stephen Castle

September 13, 2019

Facebook Icon
Twitter Icon

Have you ever wanted to use a new programming language but been overwhelmed by the huge amount of information to learn? You're not alone. That's why one of the first things many programmers who are new to a language do is write a hello world program. A hello world program means creating the simplest possible program you can write to print the words Hello World on the screen! It might not seem like much, but the objective is just to make sure everything is working and get your program running for the first time. From there you can start building more and more behavior into your program.

Try some of the examples below. Click the Try Running it here link for each example to try running the code in your brower, for some of the examples you will have to copy and paste the code into the window. Sure it doesn't do much now, but this is just the very first step in beginning your programming journey.


print("Hello World")

Try Running it here! Repl.it Python


puts "Hello World!"

Try Running it here! Repl.it Ruby


package main
import "fmt"
func main() {
 fmt.Printf("Hello World\n")

Try Running it here! Repl.it Go


console.log("Hello World");

Try Running it here! Repl.it Javascript


fn main() {
    println!("Hello World!");

Try Running it here! Repl.it Rust


print("Hello, world!")

Try Running it here! Repl.it Swift

Now that you've tried some sample hello world programs, think of something you want to learn and try searching for a hello world example of it on your favorite search engine! That's usually a great first step when beginning any programming learning journey.

We need your support.

If you would like to support Code Workshop's free meetups and content at no cost to yourself, please consider trying the Brave Web Browser. The browser with unmatched speed, security and privacy by blocking trackers. Earn rewards by opting into privacy-respecting ads and help give publishers back their fair share of Internet revenue. Also includes built in private browsing with Tor.

Similar Articles