To work through Learntris and other coding challenges here, you'll write a program on your local computer in the language of your choice. The only requirement is that your program write to standard output and read lines either from standard input or a text file.
To test your program, you need to install
Tanco is a command-line program that runs your program
and sends it inputs from our server. Tanco reports the output
of your program to the server for scoring.
Once you pass a test, it will download a rule to check that test locally.
Note that this is an alpha version of the system, and not everything is working yet.
- You will need a Google account to log in.
- Firefox login is not yet working. (Chrome works. If you have trouble with another browser, please let us know).
If you need help with any of the steps below, please
ask for help in
on our discord server.
Getting Set up
Tanco is a command line program written in python. You will need to install
python, then install the
tanco package, and then use
to connect to the server.
First Install Python 3.11 or newer.
tanco. Tanco is written in python, so you need to install python first.
Python should come with a program called
pipthat lets you install packages. It might be called
pip3on your machine, especially if you have other versions of python installed. If for some reason you don't have it, run
python -m ensurepipto install it.
tancowith the command:
pip install tanco
If you already had
tancoinstalled (because you worked through the above steps in the past) you can run :
pip install --upgrade tancoto make sure you have the latest version.
- Ensure that you can run the
tancocommand. It should show you a list of available sub-commands, like so:
tanco command line client usage: tanco [command] available commands: challenges : List challenges check : Check that the target program runs delete : Delete a challenge import : Import a challenge init : Create .tanco file in current directory login : Login to the server next : Fetch the next test show : Show the current test prompt test : Run the tests whoami : Show the current user shell : Run an interactive shell
tanco loginto log into the server through your web browser. For this alpha testing phase, you will need a Google account to log in. Also, logging in with Firefox login is not yet working. (The login page currently requires third-party cookies, which Firefox blocks by default.)
- Create a working directory for your program. It's not
absolutely required, but it's a good idea to set up version
control in the directory, perhaps with
tanco initin the working directory to create a
.tancofile. This file will store your login credentials and other information about the challenge.
tancowill list the available challenges and prompt you to enter a challenge name. Enter
- Write a program that does nothing, using your language of choice.
- Edit the
.tancofile to tell it how to run your program.
tanco checkto test your configuration until the program runs.
tanco checkcan run your program, you're ready to go.
Working through the challenge.
Once you have launched a challenge attempt, you can view the test prompts either in your terminal or through the actually-RESTful API at https://tanco.tangentcode.com/.
From the API, click "my data" and then the link for the attempt. This will take you to a page that is connected to the server with a websocket and will show live updates as you run the tests on your local machine.
From your terminal, the main workflow looks like this:
# already done: # run `tanco login` # to log in with google account. # run `tanco init` # to select challenge ande create a .tanco file make a do-nothing program while `tanco check` is not passing: tweak `.tanco` file you now start with 0 tests, so... run `tanco next` to get the first test while challenge is not complete: if `tanco test` fails: edit program to pass the failing tests else: commit any changes refactor or optimize your code (if you like) if you're ready to continue: run `tanco next` to get the next test