Big Idea 3 · Topic 3.4 · Exercise 2
Build the Badge
25 minutes - 5 targets - write the string expression that builds each one
Back to the Topic 3.4 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
From first = "Ada" and last = "Lovelace", build the short username AdaL (the whole first name, then just the first letter of the last name).
The pieces you have and the exact target output (written character by character):
The operation (concatenation and/or substring) and the expression that builds it:
Enrichment - a subtler separator, order, or position consideration:
Scenario 2 · Core
From label = "Score" and the value 8, build the display string Score: 8 (the word, a colon, one space, then the digit).
The pieces you have and the exact target output (written character by character):
The operation (concatenation and/or substring) and the expression that builds it:
Enrichment - a subtler separator, order, or position consideration:
Scenario 3 · Core
From word = "clever", build the substring eve (the middle three letters).
The pieces you have and the exact target output (written character by character):
The operation (concatenation and/or substring) and the expression that builds it:
Enrichment - a subtler separator, order, or position consideration:
Scenario 4 · Challenge
From cheer = "GO", build the chant GO-GO (the cheer, a hyphen, then the cheer again).
The pieces you have and the exact target output (written character by character):
The operation (concatenation and/or substring) and the expression that builds it:
Enrichment - a subtler separator, order, or position consideration:
Scenario 5 · Challenge
A teammate's Python code tries to grab the 4th character of word = "rainbow" with word[4], but it prints the wrong letter. Identify the bug and give the corrected expression.
The pieces you have and the exact target output (written character by character):
The operation (concatenation and/or substring) and the expression that builds it:
Enrichment - a subtler separator, order, or position consideration:
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.