0% found this document useful (0 votes)
212 views4 pages

Activity Guide - Lists Make - Unit 6 Lesson 3 & 4

This document provides instructions for a coding assignment involving lists. Students are asked to code a reminder app that uses a list to store reminders and allows the user to scroll through the reminders. They must plan the app by identifying the list, index variable, conditionals, functions, and inputs. Then they write the code, including creating events handlers and a function to update the screen. Finally, they are assessed based on a rubric checking if their app fully meets the requirements.

Uploaded by

880543
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views4 pages

Activity Guide - Lists Make - Unit 6 Lesson 3 & 4

This document provides instructions for a coding assignment involving lists. Students are asked to code a reminder app that uses a list to store reminders and allows the user to scroll through the reminders. They must plan the app by identifying the list, index variable, conditionals, functions, and inputs. Then they write the code, including creating events handlers and a function to update the screen. Finally, they are assessed based on a rubric checking if their app fully meets the requirements.

Uploaded by

880543
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Unit 6 Lesson 3 and 4

Name(s)_______________________________________________ Period ______ Date ___________________

Minor Summative Unit 6 - Lists Practice/Make /10

LESSON 3 - PRACTICE
Paste your completed code from
puzzle 2

Paste your completed code from


puzzle 5

Paste your completed code from


puzzle 7

Paste your completed code from


puzzle 10

For Puzzle 11 complete all parts, a, b,


c!

On puzzle number 13 there is a very


important reminder about the
difference between AP Pseudocode
and Java Script. What is that
Reminder?

LESSON 4 - MAKE
Computer Science Principles 1
Unit 6 Lesson 3 and 4
Step 1 - Try the app
● Add several reminders to the app.
● Scroll through your reminders.

Discuss with a Partner


● What programming patterns with lists do you think you'll need to use?

Step 2 - Plan

Lists: This app uses one list. Give it a name! What does it store?
List Name What the List Stores

Other Variable: This app uses one extra variable in addition to the list. What does it store?
Variable Name What the Variable Stores

index

Conditionals: Review the List Scrolling Pattern. Consider how you will use this in your app.

How does it work?


Many App Lab projects run in the following
way.
1. The user is interested in seeing items
in a list, like a list of favorite foods, or a
list of reminders.
2. The app shows the user one item in the
list at a time.
3. By clicking buttons (or otherwise
interacting with the app) the user can
move back and forth through the list,
one item at a time, to see every item.
This pattern allows a user to "scroll" through all
the items in the list. In order to make it work,
create an index variable and a list. Then use
the "Counter Pattern with Boundary" pattern to
create event handlers to change the value of
the index.
This pattern makes sense to use with the
updateScreen pattern since you will need at
least two buttons for scrolling left and right
through the list but afterwards will use the same
code to update the screen.

Function: What code may be repeated in your app? What should be included in your function(s)?
● Hint: Check out how the updateScreen() function is set up in the List Scrolling Pattern.

Computer Science Principles 2


Unit 6 Lesson 3 and 4

Inputs: What are the inputs for the app? These will all be turned into onEvents.
Input Action Result

"rightButton" click The reminder stored in the list at the next index is displayed.

Step 3 - Write Your Code


● Write the code for the app, using your plan above and the comments provided in Code Studio to help
● Step You Can Follow
○ Create all the variables (including the list!) from your tables above.
○ Give your variables a starting value using the assignment operator (=).
○ Create a function that updates the screen.
○ Update the output elements on the screen inside of the function.
○ Create event handlers (onEvent) for the inputs in your table above
○ Inside the event handlers, update the appropriate variable using the List Scrolling Pattern. Then call
the update screen function.
○ Use your debugging skills to identify unexpected behavior and fix your program
○ Comment your code as you go, explaining what each event handler and function does
● Extension Ideas
○ Create a button that deletes unwanted items from the list.
○ Change the list scrolling so that it wraps from the end of the list back to the beginning.

Step 4 - Submit
Before you submit, check the rubric below to make sure your program meets the requirements of the task.

Link to Project

Category Extensive Evidence Convincing Limited Evidence No Evidence


Evidence

All levels of lesson 3


and document are

Computer Science Principles 3


Unit 6 Lesson 3 and 4
complete (0 - 2)

All levels of lesson 4


are complete (0 - 1)

Input onEvents are created onEvents are created onEvents are created onEvents are not
(0 - 1) for all the required for most of the for some of the created for any
inputs. inputs. inputs. inputs.

Storage: Variables Variables and lists Variables and lists Some information is There are no
and Lists are created and are created and stored in variables variables or lists
(0 - 1) appropriately used appropriately used and lists and which store the
for all pieces of for most pieces of appropriately necessary
information used in information used in updated throughout information for the
the app. the app. the app. app to work correctly.

Processing: Lists The program The program The program The program does
(0 - 1) correctly processes correctly processes correctly processes not include or does
the list for all user the list for most user the list for some of not process a list.
interface elements. interface elements. the user interface
elements.

Code: Functions A function is used A function is used A function is used There is no function
(0 - 1) which correctly which correctly which updates some which updates the
updates all output updates most of the of the output screen.
elements. The output elements. The elements or the
function is called in function is called in function is only called
the appropriate the appropriate in some of the
onEvents. onEvents. appropriate
onEvents.

Output The screen correctly The screen correctly The screen correctly The screen does not
(0 - 1) displays the current displays the current displays some but correctly display any
reminders in all reminders in most not all information. stored information.
instances. instances.

Code runs without No errors are present One or two errors are Three or four errors More than four errors
errors. in the required code. present in the are present in the are present in the
(0 - 1) required code. required code. required code.

Coding Comments Comments are used Comments are used Comments are used Comments are not
(0 - 1) to correctly explain to explain the to explain the present.
the purpose and purpose and function purpose and function
function of all of most onEvents of some onEvents
onEvents and and functions. and functions.
functions.

Computer Science Principles 4

You might also like