OUTPUT and sequence · SALIDA y secuencia
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Esta página necesita un navegador reciente (con soporte para SharedArrayBuffer). Por favor, actualiza Chrome, Edge, Firefox o Safari a la última versión.
English
Pseudocode is the exam's language
- Cambridge International AS Computer Science 9618 writes algorithms in pseudocode.
- Use the guide for exams in 2026. The guide for 2027, 2028 and 2029 uses the same syntax.
- Statements run from top to bottom. That order is sequence.
Español
El pseudocódigo es el lenguaje del examen
- Cambridge International AS Computer Science 9618 escribe algoritmos en pseudocódigo.
- Utilice la guía para los exámenes de 2026. La guía para 2027, 2028 y 2029 utiliza la misma sintaxis.
- Las instrucciones se ejecutan de arriba hacia abajo. Ese orden es secuencia.
OUTPUT "Wake up"
OUTPUT "Brush teeth"
OUTPUT "Go to school"
Explore · Explorar
One line after another · Una línea tras otra
Pseudocode runs top to bottom — each line after the one above it. · El pseudocódigo se ejecuta de arriba hacia abajo — cada línea después de la anterior.
English
OUTPUT shows a value
OUTPUTdisplays a value. Text goes in double quotes.- Each
OUTPUTstarts a new line. - Several values, separated by commas, print on one line.
Español
OUTPUT muestra un valor
OUTPUTmuestra un valor. El texto va entre comillas dobles.- Cada
OUTPUTinicia una nueva línea. - Varios valores separados por comas se imprimen en una sola línea.
OUTPUT "Hello, world!"
OUTPUT "You have ", 3, " lives left"
English
Watch out
- Keywords are capitals:
OUTPUT, notprint. - A comma keeps values on one line. A new
OUTPUTstarts the next line. - Joining two strings with
&is taught with the string functions.
Español
Tenga cuidado
- Las palabras clave son mayúsculas:
OUTPUT, noprint. - Una coma mantiene los valores en una línea. Un nuevo
OUTPUTinicia la siguiente línea. - Juntar dos cadenas con
&se enseña con las funciones de cadena.
English
Common mistakes
- Text needs quotes. A number does not:
OUTPUT 42. - Comments start with
//and run to the end of the line.
Español
Errores comunes
- El texto necesita comillas. Un número no:
OUTPUT 42. - Los comentarios inician con
//y continúan hasta el final de la línea.
English
Now you try
- Type pseudocode in the box, then press Run.
- Press Check answer to test it.
Español
Ahora practique
- Escriba pseudocódigo en el cuadro, luego presione Run (Ejecutar).
- Presione Check answer (Verificar respuesta) para probarlo.
Use OUTPUT to print the word Hello. · Usa OUTPUT para imprimir la palabra Hello.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.
Print Red, Green and · y Blue, one per line, in that order. · Imprime Red, Green y Blue, uno por línea, en ese orden.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.
On one line, output You have , the number 3, then lives left. · En una línea, muestra You have , el número 3, luego lives left.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.