Contest Python: ACSL

checkpoint

Checkpoint 2 — Contest 2 Practice

This is a practice paper modelled on ACSL Contest 2: short-answer questions from the four Contest 2 categories, then one programming problem. The Junior paper and the Intermediate/Senior paper share their first four questions, so this checkpoint holds both six-question papers.

Questions Category Division
1–2 Prefix/Infix/Postfix Notation Junior and above
3–4 Bit-String Flicking Junior and above
5–6 What Does This Program Do? – Looping Junior
7–8 LISP Intermediate and above
9 Programming problem Junior and above

Choose your path.

  • Junior: Questions 1–6, then Question 9.
  • Intermediate or Senior: Questions 1–4 and 7–8, then Question 9. Questions 5–6 are optional extra loop practice.
  • Classroom (no programming): Questions 1–4 and 7–8. Questions 5–6 are optional, and Question 9 is left out.

Take it as a timed practice.

  • Put away your notes and set a timer.
  • Give yourself 30 minutes for the six-question paper on your path, as in the real contest. Work with pencil and paper only: no computer, no calculator. Write each answer on paper or in your notebook.
  • On the Junior, Intermediate or Senior path, then give yourself about 60 minutes for Question 9 (the Classroom path skips it). Write a complete program that reads the input with input() and prints exactly the output described. Save it as a .py file and run it from a terminal, typing the sample input or feeding it a file: python my_solution.py < sample.txt. Print nothing extra: no prompts in input(), and no words the problem did not ask for.

These times are a practice pace, not the official rules; the real limits for your division are published by ACSL at acsl.org.

How to write short answers.

  • Give exactly one answer, written the way the question asks for it.
  • For a prefix or postfix expression, separate the tokens with single spaces and keep the operands in their original order.
  • For a numeric value, write a whole number when the value is whole, and otherwise a decimal such as 13.5.
  • For a bit string, write every bit, at the full length given in the question.
  • For a list of bit strings, write them from smallest to largest, separated by a comma and a space.
  • For a LISP list, write it in parentheses with single spaces, such as (A B C), using the capital letters the question uses.
  • For a program, write exactly the one line it outputs.

When you finish, check yourself.

  • Short answers have no sample to test against. Mark the questions you were unsure of, then work each one again by its unit's method: redo the stack or the trace, or turn a conversion back and check that you get the question. Compare with a partner, or with a second attempt made without looking at the first.
  • The programming question is checked against its sample, and against inputs of your own made from its constraints: the smallest cases, the largest, and the tricky ones.

Then go back to the unit for any category that cost you points.

Go to the questions (9)

For parents and teachers: report a problem