CR1-S01 · Piensa como un programador · Learn

Back to your course / CR1-S01

Computing and Robotics · 1.º ESO · Learn

Think like a programmer

An interactive program responds to actions by following instructions someone has designed. In six paired sessions you will turn an idea into a plan, build it in Scratch and explain its results through testing. The short workshops prepare the two assignments; they do not create additional graded submissions.

6 planned lessonsCR1-S01
Ideas, instructions and tests: build a solution you can explain.

Your mission

Create a small interactive program with a clear purpose and audience: a collecting game, a story or a route. Include a start, interaction, a loop, a condition and a value whose initialization you can explain. Plan before building, run at least two tests, verify a correction and introduce an improvement.

Original illustration of students planning and testing a computing project.
Ilustración original creada para esta situación de aprendizaje · Sintaxis Divergente, 2026.

Read the explanation, study the diagram and try the activity in each section. You can choose another version at any time.

Your tools

Use Google Docs for written explanations and diagrams.net for diagrams. Save the editable file as well as the evidence requested in each task.

1.1. Think before programming

Learn · theory and practice

An algorithm describes ordered steps for achieving a result. It can exist on paper: route instructions are algorithms too when they specify the necessary actions. A program expresses instructions in a language a computer can execute. In Scratch we use blocks. The machine follows what we have specified, so an intention such as ‘arrive successfully’ must become observable actions and conditions. We must also agree where the route starts and which way the character faces.

Decomposition means dividing a problem into parts we can understand and test. In an interactive story we can separate the introduction, the user’s choice and the response. Each part has an input or starting action and an expected result. We then check how the parts relate. This helps locate errors: if the choice works but the response does not change, we investigate that relationship. Writing the plan before dragging blocks lets partners discuss it and improve an ambiguous instruction without rebuilding the whole project.

Goal and starting conditionsOrdered, precise instructionsExpected result to check
An algorithm turns a goal into ordered, precise steps.
  1. Problem
  2. Parts
  3. Precise steps
  4. Expected result
Original diagram · Sintaxis Divergente

A worked example

A paper figure must carry a card to a table. ‘Go there’ specifies neither the route nor its orientation. The team agrees on a starting square and writes movements and turns. Testing reveals that ‘right’ referred to the observer. Marking the figure’s front lets them revise the instruction using the same reference throughout.

Qué es un algoritmo y para qué se usa | Computación y programación

Published by: LearnFree en Español · Open on YouTube

Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.

The video keeps its original spoken language. Use the captions available in the player if they help.

Your turn

  1. In Google Docs describe an everyday task and separate the problem, device, starting action and expected result.
  2. Write a four-instruction route with an initial position and orientation; ask your partner to act it out with paper.
  3. Revise an ambiguous instruction and explain which part of the problem you isolated for testing.
Pause and check

What information is missing from ‘wait a little’, and why is a paper algorithm not yet an executable Scratch program?

↑ Back to the index

1.2. Draw an understandable plan

Learn · theory and practice

A flowchart represents a process’s order using shapes and arrows. We usually use ovals for start and finish, rectangles for actions and diamonds for questions. The shapes execute nothing: they communicate a proposal. An arrow indicates where to continue; at a question, each outgoing path needs an answer such as Yes or No. If a branch has no destination, another person cannot know what to do in that case. A clear route therefore matters more than decoration.

An interactive program may check a question again. The diagram must show that return when the action needs repetition. Asking about a key once differs from monitoring it throughout a game. In diagrams.net we draw readable paths and add a short written description so someone can follow them without interpreting the shapes. Partners can trace the branches using concrete cases. Exporting a PNG makes the drawing easy to include in the design document, while keeping the editable file allows later revisions.

StartCondition?YesNoAction AAction B
A question has separate labelled paths.
  1. Start
  2. Question
  3. Yes / No
  4. Branch action
  5. Continuation
Original diagram · Sintaxis Divergente

A worked example

A story’s door opens only if the character has a key. The diamond asks about the key; Yes leads to opening and No to displaying a clue. Both branches continue somewhere. To allow another attempt later, we draw the return to the question. The diagram explains this possibility before we choose any blocks.

Your turn

  1. Open diagrams.net and represent a task different from the example with a start, actions, a question and Yes and No branches.
  2. Trace both answers with your partner and add a return if the input needs checking again.
  3. Save the editable diagram, export a PNG and insert it into Google Docs with a written description of the route.
Pause and check

How does your plan show the difference between a question checked once and one that must be checked again?

↑ Back to the index

1.3. Get to know Scratch

Learn · theory and practice

Scratch lets us create animations, stories and games by connecting blocks. The stage shows the result of execution. Sprites or characters can have their own scripts, costumes and sounds; the backdrop belongs to the stage. The palette groups block categories, and the coding area contains instructions for the selected element. Before adding or changing blocks, check which sprite you are editing. A correct movement instruction placed on the target moves the target, even if you were thinking about the player.

Colors help locate categories, but we must also read names and recognize shapes. A start block identifies the event that launches its sequence. Disconnected blocks do not run with it simply because they are nearby on screen. A costume changes a sprite‘s appearance without necessarily creating a new character. Depending on the classroom setup, we can use the editor or Scratch Desktop and keep an .sb3 file without creating a personal account. That project preserves editable blocks; a screenshot shows only one moment.

  1. Selected sprite
  2. Its script
  3. Triggered event
  4. Stage
Original diagram · Sintaxis Divergente

A worked example

Two characters look identical, but only one has a flag sequence. Changing the other’s costume adds no instructions. Selecting each thumbnail reveals different scripts. This comparison separates appearance from behavior: to know which sprite will move, inspect which sprite owns the script and which event starts it, as well as watching the stage.

Scratch editor: blocks on the left, program in the middle and stage on the right.
Editor de Scratch 3.0; la imagen muestra la interfaz en inglés, pero puedes elegir español en Scratch. Imagen de SergioFLS / Wikimedia Commons, CC BY-SA 2.0; sin cambios.

Primeros pasos con Scratch 3.0

Published by: INTEF · Open on YouTube

Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.

The video keeps its original spoken language. Use the captions available in the player if they help.

Your turn

  1. Open Scratch and locate the stage, sprites, palette and coding area; choose the language you need.
  2. Select a sprite and connect a flag event to a costume change; predict and run it. Check which blocks another sprite owns.
  3. Save CR1-S01_practica.sb3 and explain in Google Docs what the file preserves that a screenshot does not.
Pause and check

If the wrong character changes costume, which selection and script would you inspect before adding more blocks?

↑ Back to the index

1.4. Position, change and direction

Learn · theory and practice

Position is expressed as a coordinate pair, x and y. In Scratch‘s usual stage, the center is (0, 0), the horizontal axis runs from −240 to 240 and the vertical axis from −180 to 180. Increasing x moves right; increasing y moves up. Negative values indicate the opposite side of the center. These coordinates describe the stage, not centimeters in the physical world. To trace movement, keep the axes separate and include the starting position.

Setting x to a value replaces the previous coordinate. Changing x by a value adds that amount to the current position; a negative increment subtracts. Repeating an assignment does not produce the same route as repeating an addition. Direction is another property: it indicates where the sprite points. Moving steps follows that direction, whereas changing x acts along the horizontal axis. Setting both position and direction at the start makes tests comparable and helps explain whether a difference comes from the program or a different starting state.

(80, 50)0−240240180−180xy
Position uses two coordinates; direction is a separate property.
  1. Initial position
  2. Assignment or increment
  3. New coordinate
  4. Trace
Original diagram · Sintaxis Divergente

A worked example

A butterfly starts at (−20, 15). Changing x by 12 places it at (−8, 15); setting x to 12 would place it at (12, 15). The same number produces different results because one instruction adds and the other replaces. Facing upward, moving 12 steps changes its height. That third instruction depends on direction rather than x alone.

The Scratch stage has a horizontal x axis from −240 to 240 and a vertical y axis from −180 to 180.
Ejes del escenario. INTEF, Coordenadas y movimiento; elaboración propia utilizando Scratch, CC BY-SA 4.0; sin cambios.

Your turn

  1. In Scratch place a sprite at (−40, 10) facing up; predict and test changing x by 15 and then y by −5.
  2. Repeat from the same start, replacing the first instruction with setting x to 15; compare traces in Google Docs.
  3. Return to the start and test moving 15 steps; explain which difference depends on direction.
Pause and check

Why does repeating ‘set x to 10’ three times not add 30 to the starting position?

↑ Back to the index

1.5. Events that start sequences

Learn · theory and practice

An event is something a program can respond to: a key press, a click on a sprite or activation of the flag. The event block starts the instructions connected below it. Order matters within that sequence: saying a message before moving communicates something different from saying it afterward. Waiting lets us observe an action for a period, but adds no distance by itself. To explain what happened, first identify the event you triggered, then follow its instructions in order.

The flag can prepare the initial state while a key triggers another action during use. These are separate sequences. Several sprites may respond to the same flag, and one sprite can have several scripts; do not assume everything runs as one ordered list across sprites. At this introductory level, avoid simultaneous instructions changing the same property without coordination. If nothing happens, inspect selection, connections and the event before changing movement. Separating preparation from control makes restarting and repeating the same test easier.

  1. Event
  2. Connected sequence
  3. Action order
  4. Visible response
Original diagram · Sintaxis Divergente

A worked example

A star says ‘Start’ and then changes position when the flag is clicked. Reversing the instructions displays the message at the destination. Distance may stay the same, but communication changes. A space-key sequence can change the costume without repeating movement: it runs only its own blocks. We compare versions from the same starting position and observe when each message appears.

Your turn

  1. In Scratch create a flag sequence with an initial position, message, movement and pause; record your prediction in Google Docs.
  2. Swap message and movement, run from the same start and describe what changes and what stays the same.
  3. Add a space-key sequence to change the costume and check that it does not run actions belonging only to the flag.
Pause and check

Why does pressing space not necessarily run the script headed by a flag?

↑ Back to the index

1.6. Repetition and traces

Learn · theory and practice

A loop runs a group of instructions several times. Each pass is called an iteration, and the boundary of the Scratch block shows which actions belong to it. When we know how many iterations are needed, we use a finite repeat. Instructions placed afterward wait for all iterations to finish. By contrast, forever keeps repeating while the project is running: that sequence cannot reach a later action while it remains inside the loop. Each block’s position therefore changes the behavior.

To understand this behavior, we can write a trace: a record of the states produced step by step. The initial position counts too, so there will be one more recorded position than movements. If each iteration adds an increment to a coordinate, the trace lets us follow intermediate positions and predict the final one. A pause inside the loop gives us time to observe each iteration; outside a finite repeat, it waits after all iterations have finished.

This organization avoids copying the same instructions and lets us change a shared rule in one place. It also helps explain an animation: repeating movement, a message and a pause creates a different experience from repeating only movement and showing the message at the end. Even if the sprite finishes at the same point, the visible sequence can differ. Comparing from a known starting state reveals that difference. Repeating an incorrect instruction more often preserves the error; understanding one iteration helps us decide what should repeat and what should remain outside.

Repeat these instructionsNumber of repeats or a condition
A loop returns to its instructions. Its type determines when it stops.
  1. Initial state
  2. One iteration
  3. New position
  4. Next iteration
  5. Planned end
Original diagram · Sintaxis Divergente

A worked example

A cloud starts at x = −30 and repeats three changes of x by 8. Its trace is −30, −22, −14, −6: four positions and three movements. A message afterward appears once. Inside, it would appear on each iteration. Comparing the trace and messages shows that two programs can finish at the same place yet behave differently.

Repeat and forever control blocks in Scratch.
Bloques de repetición. PENTEC / INTEF, CC BY-SA 4.0; sin cambios.

EPCIA BuclesYCondicionales 1 INTROBUCLES

Published by: INTEF · Open on YouTube

Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.

The video keeps its original spoken language. Use the captions available in the player if they help.

Your turn

  1. In Scratch start at x = −45 and repeat four changes of x by 9; write the trace before running it.
  2. Move a message with a pause inside and outside the loop and compare its appearances in Google Docs.
  3. Test an animation with three costume changes and compare an inside and outside pause; explain what the user would see.
Pause and check

How do four movements differ from four recorded positions, and where would you place a pause to observe each movement?

↑ Back to the index

1.7. Make decisions and keep a value

Learn · theory and practice

A condition is a question that a program evaluates as true or false at a particular moment. The if block runs the instructions inside it when the answer is true; if / else chooses between two alternatives. The question and its consequence have different roles. Detecting that two sprites are touching supplies an answer, but does not itself change position, messages or score. Behavior depends on the instructions we associate with that result.

When we need to retain information, we use a variable: a value associated with a name, such as points. This memory lets an arrival relate to previous arrivals. Setting points to zero establishes the initial value; changing points by one adds one to the previous value. Setting them to one replaces that value and therefore does not count successive arrivals. The difference between replacing and incrementing explains why two blocks containing the same number can produce different scores.

A condition also depends on when we check it again. A single check cannot detect a key pressed later; repeating the question inside forever keeps the control active. However, prolonged contact can remain true across many iterations and trigger several additions. Separating sprites after collection or waiting for contact to end lets us distinguish new arrivals. Tests involving still contact, separation and return check that rule. On restart, initializing values and positions restores a known state without results inherited from the previous run.

puntos = 0puntos = 1Initial valueUpdated valueSame name · different value
A variable has a name and a value that can change.
  1. Current input
  2. Condition
  3. Chosen branch
  4. Updated value
  5. Next check
Original diagram · Sintaxis Divergente

A worked example

A character activates a bell by touching it. The condition stays true while they overlap, so the alert may repeat many times. These are not many arrivals: it is prolonged contact. Before counting, the team defines a new activation. Staying still, then moving away and returning, provides two tests that distinguish the behaviors.

EPCIA BuclesYCondicionales 4 CONDICIONALES

Published by: INTEF · Open on YouTube

Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.

The video keeps its original spoken language. Use the captions available in the player if they help.

Your turn

  1. In Scratch create points, initialize it and program horizontal controls with repeated conditions; diagram their relationship in diagrams.net.
  2. Add interaction with a sprite and a rule distinguishing new contacts; predict before testing still contact and separation followed by return.
  3. Restart and record positions, points and results in Google Docs; compare setting points to one with incrementing them.
Pause and check

Why can a condition that stays true for several iterations add multiple points even when you arrived only once?

↑ Back to the index

1.8. Test, debug and explain

Learn · theory and practice

Testing means performing an action from known conditions and comparing the outcome with a prediction. A test states what you did, expected, observed and concluded. A screenshot can support it but cannot alone demonstrate control or restart behavior. Debugging investigates and corrects differences between expected and observed behavior. To reproduce a discrepancy, keep the initial position, direction, values and action sequence consistent. Without that reference, we might compare different situations and attribute the change to the wrong block.

Investigate one cause and change one thing at a time. Then repeat the failed test and check another related function. This distinguishes a repair from a change that merely hides the problem. An improvement addresses a need, such as clearer instructions, and must also be tested. The project combines plan and product: A01 keeps the design and microtest; A02 brings together the program, tests, correction and improvement. Partners alternate operating and observing, save versions and explain their own decisions. Choose extensions after understanding the main function; tutorials do not become extra submissions.

  1. Prediction
  2. Observation
  3. Cause hypothesis
  4. Single change
  5. Repeated test
Original diagram · Sintaxis Divergente

A worked example

An arrow should move a submarine down, but it increases y. The team records the start and the value after one press, locates the increment’s sign and changes only that instruction. They repeat the case, then test upward movement. This second check matters: the repair must fix the error without losing the opposite control or depending on an accidental position.

Your turn

  1. Open your Scratch prototype and a Google Docs test table; predict and run two actions from a known start.
  2. Investigate a real fault or one introduced in a copy and labeled as a practice fault; record cause, change and repeated test.
  3. Ask another pair to complete a specific task without guidance, improve an observed difficulty and check another function after the change.
Pause and check

What information would let someone else reproduce your bug and verify that the correction fixes it?

↑ Back to the index

Your project and submissions

A01 · Design the solution

  1. Create CR1-S01_A01_Apellidos in Google Docs; you may make a copy of the A01 template linked below. Describe the need, audience and purpose.
  2. Include stage, character, target and controls; insert the diagrams.net PNG and explain the algorithm, event, loop, condition and initial value.
  3. Plan at least two tests with actions and expected results. Include an executed Scratch workshop microtest with prediction, trace and observation.
  4. Record sources and permissions, identify contributions and review the design with the teacher. Each partner explains a decision and the microtest.

What to submit

  • Design dossier, editable diagram and PNG, algorithm and two predictions.
  • Executed .sb3 microprogram and record of its trace and result.
  • Sources and permissions, contribution record and individual explanation; workshop work is included here.

A02 · My first interactive program

  1. Build the revised Scratch design in parts: start, controls and interaction. Add brief usage instructions and save CR1-S01_juego.sb3.
  2. In Google Docs document CR1-S01_A02_Apellidos, record at least two cases with action, expected result, observation and conclusion; also check restart and scoring where relevant.
  3. Document a discrepancy, its cause, a correction and the repeated test. Introduce an improvement and verify its effect while retaining earlier functions.
  4. Submit the .sb3 file, instructions, record and sources. Each partner explains a decision, predicts a result and performs or precisely describes a modification.

What to submit

  • An .sb3 project that opens and preserves its blocks, with explainable interaction, event, loop and condition.
  • A02 document with at least two tests, a corrected issue and a verified improvement.
  • Instructions, credits and individual demonstration included in A02; consult the published rubrics for assessment.

Before you submit

  • I can trace my algorithm and explain how it becomes blocks.
  • I predict a position by distinguishing setting, changing and moving in a direction.
  • I explain what starts a sequence and what repeats or makes a decision during play.
  • I reset positions and values and check that contact does not accidentally accumulate points.
  • I compare prediction and observation, justify a correction and explain my contribution. These are self-assessment descriptors, not new official criteria.

Templates and files

Open the blank A01 or A02 template and make your own copy in Google Docs. Keep the editable file from your project platform as well.

These reusable templates help you organise your work. Follow the specific instructions and evidence list for this unit; remove fields that do not apply. The blank master is read-only. Keep your answers private and share them only as your teacher instructs.

A01 · Design the solution

  • Design dossier, editable diagram and PNG, algorithm and two predictions.
  • Executed .sb3 microprogram and record of its trace and result.
  • Sources and permissions, contribution record and individual explanation; workshop work is included here.

A02 · My first interactive program

  • An .sb3 project that opens and preserves its blocks, with explainable interaction, event, loop and condition.
  • A02 document with at least two tests, a corrected issue and a verified improvement.
  • Instructions, credits and individual demonstration included in A02; consult the published rubrics for assessment.

Classroom rubrics

The classroom assessment reference is preserved below in its original Spanish. Use the checklist above to prepare your work and ask your teacher about any descriptor you need to clarify.

Ver la rúbrica de A01 · diseño y microprueba

Diseño y microprueba

CYR.1.1.3 Estructura del programa Scratch

Entender la estructura básica de un programa informático.

Evidencia. Algoritmo anotado, traza y microprograma Scratch ejecutado de 03 o 04.

BandaDesempeño observable
1–2,9Confunde la orden de inicio con el movimiento y no puede seguir la secuencia del microprograma.
3–4,9Reconoce evento y movimiento, pero sitúa fuera del bucle una comprobación continua o no anticipa su resultado.
5–6,9Localiza evento, variable, bucle y condición en el microprograma. Predice una secuencia y la contrasta al ejecutarla.
7–8,9Explica por qué cambia el resultado al mover una instrucción dentro o fuera del bucle y comprueba su predicción.
9–10,0Transfiere esa explicación a una secuencia nueva y distingue fijar una posición de incrementarla, con una traza correcta.

CYR.1.2.1 Resolver y comunicar el reto programado

Conocer y resolver la variedad de problemas posibles, desarrollando un programa informático y generalizando las soluciones, tanto de forma individual como trabajando en equipo, colaborando y comunicándose de forma adecuada.

Evidencia. Necesidad, algoritmo propio, dos predicciones, microprueba y aportación individual.

BandaDesempeño observable
1–2,9El algoritmo no responde al objetivo y no identifica qué parte realizó o cómo podría comprobarla.
3–4,9Define el objetivo, pero faltan pasos o resultados esperados. El reparto no permite reconocer la aportación individual.
5–6,9Ordena una solución al reto, ejecuta una microprueba y compara resultado con predicción. Explica su aportación y escucha la revisión de su pareja.
7–8,9Corrige el algoritmo a partir de la prueba y explica qué pasos servirían para otro recorrido.
9–10,0Prueba un recorrido nuevo, adapta los parámetros necesarios y justifica qué procedimiento puede reutilizar el equipo.
Ver la rúbrica de A02 · programa, pruebas y mejora

Producto pruebas y mejora

CYR.1.1.3 Estructura del programa Scratch

Entender la estructura básica de un programa informático.

Evidencia. Archivo sb3, pruebas de movimiento y reinicio, explicación individual de bloques.

BandaDesempeño observable
1–2,9Los bloques no producen la interacción prevista y la explicación atribuye el resultado a instrucciones que no se ejecutan.
3–4,9Hay movimiento, pero falla la condición de meta o el reinicio y no explica su causa.
5–6,9El programa inicia, admite controles, comprueba la meta y reinicia el dato previsto. Cada integrante explica evento, bucle y condición.
7–8,9Localiza y repara un fallo de ubicación de bloques o actualización de puntos y repite la prueba.
9–10,0Adapta una regla del juego a otro caso y justifica con una traza que no introduce puntuaciones repetidas ni rompe el reinicio.

CYR.1.2.1 Resolver y comunicar el reto programado

Conocer y resolver la variedad de problemas posibles, desarrollando un programa informático y generalizando las soluciones, tanto de forma individual como trabajando en equipo, colaborando y comunicándose de forma adecuada.

Evidencia. Juego editable, dos pruebas, incidencia resuelta y explicación de una variante.

BandaDesempeño observable
1–2,9El producto no resuelve el recorrido y no puede explicar ni modificar una parte propia.
3–4,9Resuelve solo un recorrido con ayuda para identificar el fallo y comunica resultados sin relacionarlos con la regla.
5–6,9Resuelve el reto, registra dos pruebas y una corrección. Cada integrante explica una decisión y colabora en la revisión.
7–8,9Adapta el recorrido conservando la estructura del programa y justifica la corrección con resultados antes y después.
9–10,0Resuelve una variante no ensayada, explica la solución general y contrasta razonadamente una propuesta distinta de su pareja.

Videos, resources and sources

EPCIA BuclesYCondicionales 2 PORSIEMPRE

Published by: INTEF · Open on YouTube

Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.

The video keeps its original spoken language. Use the captions available in the player if they help.

EPCIA BuclesYCondicionales 6 LABERINTO

Published by: INTEF · Open on YouTube

Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.

The video keeps its original spoken language. Use the captions available in the player if they help.

Keep learning

Editorial revision: October 2026.