π
OfflineAuto-marked
Your mission
Key syntax
Mission checklist
π€
Byte says
Predict what your program should do before pressing Run.
Model solution
Ready.
OUTPUT CONSOLE
Runner syntax guide
Output and input
print(x)name = input("Name: ")Selection
if condition thenelseif condition thenelseendifLoops
for i = 0 to 4 β¦ nextwhile condition β¦ endwhiledo β¦ until conditionArrays
array a[5]array grid[3,4]a[0] Β· grid[1,2]Functions
function double(n)return n * 2end functionProcedures
procedure greet(name)end proceduregreet("Sam")Strings
word.lengthword.substring(2,4)word.left(3) Β· word.right(3)word.upper Β· word.lowerCasts and Booleans
whole = int(value)text = str(number)True Β· FalseSQL missions
SELECT fieldFROM tableWHERE conditionFiles
newFile("a.txt")f = open("a.txt")f.writeLine(x)f.readLine()f.endOfFile()f.close()Important: arrays and strings are zero indexed. Conditions compare using == or !=. Use AND, OR and NOT for logic.