A beginner-friendly introduction to programming using the Turing language.
Turing is an educational programming language designed to help beginners learn programming concepts clearly and logically. It is commonly used in schools to introduce core ideas such as input, output, variables, and control flow.
The put statement is used to display output on the screen.
put "Hello, world!"
Output:
Hello, world!
Programs often need information from the user.
The get statement allows the program to read input.
var name : string
put "Enter your name:"
get name
put "Hello, ", name
nameVariables store data so it can be used later in the program. In Turing, you must declare a variable before using it.
var age : int
age := 16
put "Age:", age
int โ integers (whole numbers)real โ decimal numbersstring โ textboolean โ true / false values
var score : int
get score
if score >= 50 then
put "Pass"
else
put "Fail"
end if
The program checks a condition and runs different code depending on the result.
for i : 1 .. 5
put "Hello"
end for
This loop prints Hello five times.
if statements