Skip to content
EspañolWorkspace →

PSeInt Limpiar Pantalla and Esperar: examples

1 example

How it works

Limpiar Pantalla (or Borrar Pantalla) empties the console, like starting on a fresh page. Menus and games use it so each screen doesn't mix with the previous one.

Esperar pauses before continuing: Esperar 1 Segundo or Esperar 500 Milisegundos. Esperar Tecla stops the program until the person presses a key, so they can read at their own pace.

Together they make simple animations: show something, wait, clear, show the next thing. A countdown is the simplest example.

Short example

The least you need to see it work. Copy it or open it in the editor.

clear-screen-and-wait.psc · 9 lines
Algoritmo Countdown    Definir i Como Entero    Para i <- 3 Hasta 1 Con Paso -1 Hacer        Limpiar Pantalla        Escribir i, "..."        Esperar 1 Segundo    FinPara    Escribir "Liftoff!"FinAlgoritmo

What it prints:

3...2...1...Liftoff!
Open it in Codoritmo

Opens in the browser editor, nothing to install.

Solved exercises

Each exercise comes with the full code, its flowchart and a sample run.

  • Countdown

    A rocket launch countdown that ticks second by second.

    Beginner

In the language reference

The instructions involved, explained one by one.

Other concepts

Codoritmo is an independent, open-source project inspired by PSeInt and compatible with its syntax. It is not affiliated with the PSeInt project. Official PSeInt website.