πŸŽ“ A1Learner
πŸ”
0 of 52 lessons completed

Julia Introduction

A Julia program is a set of instructions that the computer follows. Printing shows a value on the screen so you can see the result.

println prints text

This program has one instruction. It prints a greeting.

println("Hello, Julia!")

println prints a number

A number needs no quotes. Julia prints it just as it is written.

println(42)

Instructions run from top to bottom

This program has two instructions. The first line prints before the second line.

println("First")
println("Second")

Example

println("My first Julia program")
println(2026)
println("Done")

Key points

  • Program: a set of instructions the computer follows in order.
  • Value: a single piece of data, such as a number or a piece of text.
  • Use println to print a value and then move to a new line.
  • Text: words written inside double quotes.
  • Number: a value written without quotes, such as 42.

In this example, the first line prints a piece of text. The second line prints a number. The third line prints one last piece of text, and the lines appear in the order they were written.

Note

Julia prints text without the quotes around it.

Try it Yourself

Edit the code, then press Run.

Running is simulated Β· JuliaHub

Exercise

What does the code println("Hi") print?