This is a practice paper modelled on ACSL Contest 3: short-answer questions from the four Contest 3 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 | Boolean Algebra | Junior and above |
| 3–4 | Data Structures | Junior and above |
| 5–6 | What Does This Program Do? – Arrays | Junior |
| 7–8 | FSAs and Regular Expressions | 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 array practice.
- Classroom (no programming): Questions 1–4 and 7–8. Questions 5–6 are optional, and Question 9 is left out.
- Elementary (no programming): this checkpoint is not your paper. Your Contest 3 practice test is Exercises 1–6 of Unit 8 (Boolean Algebra): six questions in 30 minutes.
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 and Elementary paths skip it).
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 a simplified Boolean expression, write a sum of products in the book's notation:
~NOT,*AND,+OR, with a single space around*and+. Inside a term, put the literals in alphabetical order of their variables; order the terms the same way, withXbefore~X, and a shorter term first when one term runs out. - For the values that make an expression true, write each as a bracketed tuple in alphabetical order of the variables with no spaces inside, such as
(1,0,1), list them in ascending binary order, and separate them with a comma and a space. - For a value popped from a stack or a queue, or a count or a path length, write it as a whole number or a letter.
- For a question with lettered options, write the letters of every option that qualifies, in alphabetical order, separated by a comma and a space, such as
A, E; writeNONEif no option qualifies. - 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 truth table, the tree or the trace, or test an option on short strings. 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.