This is a practice paper modelled on ACSL Contest 1: short-answer questions from the three Contest 1 categories, then one programming problem. Questions 1–6 are a full six-question paper; Question 7 is extra all-constructs practice for Intermediate and Senior.
| Questions | Category | Division |
|---|---|---|
| 1–2 | Computer Number Systems | Junior and above |
| 3–4 | Recursive Functions | Junior and above |
| 5–6 | What Does This Program Do? – Branching | Junior and above |
| 7 | What Does This Program Do? (all constructs) | Intermediate and above |
| 8 | Programming problem | Junior and above |
Take it as a timed practice.
- Put away your notes and set a timer.
- Give yourself 30 minutes for the short answers, as in the real contest: Questions 1–6 on every path. On the Intermediate or Senior path, add Question 7 as an extra challenge; it goes beyond the real six-question paper. Work with pencil and paper only: no computer, no calculator. Write each answer on paper or in your notebook.
- Then give yourself about 60 minutes for Question 8.
Write a complete program that reads the input with
input()and prints exactly the output described. Save it as a.pyfile 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 ininput(), 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 an answer in another base, write only the digits, with capital letters
A–Ffor hex digits, no base subscript and no leading zeros. - For a recursive function, write the value as a plain whole number.
- For a program, write exactly the one line it outputs.
If you follow the Junior path, do Questions 1–6 and 8. If you follow the Intermediate or Senior path, do all eight questions. 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 trace or the call table, or check a conversion both ways. 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.