# Programs without a screen

Mark a **function** `main` instead of a container, and Vi runs it once as a console program: no
screen, just what it prints. Studio shows a **Console** screen with the output and a **Run again**
button.

```vi
main times_table():
  for n in [1, 2, 3, 4, 5]:
    print(n, "× 7 =", n * 7)
```

A file can have both a `main` container and a `main` function: the app shows the screen and runs
the function once when it starts.
