AP CSP 3.7 Exercise 2: Design the Gate

Big Idea 3 · Topic 3.7 · Exercise 2

Design the Gate

25 minutes - 4 rule sets - write the nested conditional

Back to the Topic 3.7 lessonAll CSP topics

How this page works

The writing boxes below are yours. What you type stays in this browser, is saved here as you go, and is never sent to us or to your teacher. Hand the written work in the way your teacher asked for it.

The graded check at the bottom is the part that records to your teacher's gradebook.

The cases, from your handoutNot recorded

The same cases as your handout, in the same order.

Scenario 1 · Foundational

The Vortex gate: a rider must be at least 48 inches tall to ride. Among tall-enough riders, those at least age 12 see 'Enjoy the ride'; those under 12 see 'Ride with an adult'. Riders under 48 inches see 'Too short to ride'.

The gating question (your OUTER condition):

Your nested IF/ELSE pseudocode (put each message in one branch):

Scenario 2 · Core

A social site shows the 'Post' button only to users who are logged in. Among logged-in users, only those whose email is verified see 'Post'; logged-in users without a verified email see 'Verify your email'. Anyone not logged in sees 'Please log in'.

The gating question (your OUTER condition):

Your nested IF/ELSE pseudocode (put each message in one branch):

Scenario 3 · Challenge

A grader: a score of at least 60 is passing. Among passing scores, a score of at least 90 earns 'A', otherwise 'Pass'. A score under 60 earns 'Fail'.

The gating question (your OUTER condition):

Your nested IF/ELSE pseudocode (put each message in one branch):

Scenario 4 · Challenge

An online store: free shipping is offered only to members. Among members, orders over $50 see 'Free shipping'; members with orders of $50 or less see 'Add more for free shipping'. Anyone who is not a member sees 'Members only'.

The gating question (your OUTER condition):

Your nested IF/ELSE pseudocode (put each message in one branch):

No graded check on this page yetNot recorded

About the line in your handout

Your handout says this exercise is available online and auto-graded. The exercise IS here, and it is the same work in the same order, but the auto-graded half is not written for this topic yet. Nothing on this page is scored or sent to your teacher.

Hand this in the way your teacher asked for it. Topic 1.1 has its graded check today, and the rest follow.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]