SMALL PROGRAMS, CLEAR INTENT

English you can build with.

Copy a complete example into a .saf file. Check and run it locally with Safarli. Each output below is an expected result; this website does not execute your code.

Give your ideas a name.

Describe three movies, change a rating, and show the result.

Natural sentence syntax · Complete stdout shown

movies.saf
Orbit is a movie with a rating of eight.
Comet is a movie with a rating of six.
Nova is a movie with a rating of nine.
Increase Comet's rating by three.
Show Comet's rating.
Show Nova's rating.
Expected output
9
9
Runs locally in Safarli

Follow a relationship.

Name a mentor explicitly, then update the mentor’s rating.

Natural sentence syntax · Complete stdout shown

mentors.saf
Cora is a pilot with a rating of eight.
Ben is a pilot with a rating of ten.
Cora has a mentor of Ben.
Increase Cora's mentor's rating by one.
Show Ben's rating.
Expected output
11
Runs locally in Safarli