diff --git a/course/bjc4nyc_teacher.html b/course/bjc4nyc_teacher.html index c844967470..c1c7479a18 100755 --- a/course/bjc4nyc_teacher.html +++ b/course/bjc4nyc_teacher.html @@ -9,13 +9,14 @@

Beauty and Joy of Computing Teacher Guide

BJC was developed by the University of California, Berkeley, and Education Development Center, Inc. Teacher professional development has been a partnership with North Carolina State University, the New York City Department of Education, and the New York City Foundation for Computer Science Education.

+

You may enjoy these short videos about a BJC classroom and a former BJC student turned CS major.

Beauty and Joy of Computing
- +
To give students before the exam:
Snap! Cheat Sheet
To get late-adding students up to speed:
Snap! Crash Course
diff --git a/cur/compare.html b/cur/compare.html index f5a29f5757..bc896660bd 100644 --- a/cur/compare.html +++ b/cur/compare.html @@ -129,7 +129,7 @@

Social Implications of Computers 

We take the stand that any technology has risks and benefits, and that people decide how to minimize risks and maximize benefits. Therefore, in each topic, we have students evaluate alternate points of view. For example, rather than shut down debate on the downloading of copyrighted works (e.g., music), which many students do, we try to open the issue by eliciting honest perspectives on both the value and harm in it, and whether there are ways to protect the value and remedy the harm (e.g., by considering alternate ways to support artists and writers). Both student pages and the Teachers' Guide point to provocative readings on each topic.

In general, we hope to leave students feeling optimistic about the benefits of technology, but also ready to think critically about any specific technology. We also remind them that the decisions about how a new technology is used are made by human beings, including themselves if they pursue a career in computer science, so they shouldn't feel helpless in the face of a supposed technological imperative.

-

We use the excellent Blown to Bits as the textbook for this part of the course. (There is no textbook for the technical parts of the course, beyond the online materials we provide.) The book is aimed at adult readers, and will be difficult especially for ESL students, so we use short excerpts and discuss alternative presentations in the Teachers' Guide. Like the rest of the course materials, this book is avaliable free online, with a Creative Commons BY-NC-SA license.

+

We use the excellent Blown to Bits as the textbook for this part of the course. (There is no textbook for the technical parts of the course, beyond the online materials we provide.) The book is aimed at adult readers, and will be difficult especially for ESL students, so we use short excerpts and discuss alternative presentations in the Teachers' Guide. Like the rest of the course materials, this book is available free online, with a Creative Commons BY-NC-SA license.

The book is a few years old now, so we supplement it with current readings, looking for topics that will be relevant to students. Students choose their own topics to study in more depth; this is one way we appeal to a diverse audience. We start class meetings with "Computing in the News," presenting items from that morning's newspaper, one generally positive and one problematic. After some teacher-chosen examples to illustrate the idea, we encourage teachers to assign the selection of articles to students in rotation.

diff --git a/cur/performance-tasks/create-brian.html b/cur/performance-tasks/create-brian.html index 86ab1f926b..2d9e5e0f8d 100644 --- a/cur/performance-tasks/create-brian.html +++ b/cur/performance-tasks/create-brian.html @@ -24,7 +24,7 @@

Showing Your Code for the AP Create Task

Creating Script Pics

- You can download a PNG image file of any block or script by right-clicking it (or control-clicking it on a mac) and selecting "script pic..." If a new window opens with the picture, use your browser's Save command (in the File menu) to save it. If not, look in your browser's Downloads folder for the image file.
+ You can download a PNG image file of any block or script by right-clicking it (or control-clicking it on a Mac) and selecting "script pic..." If a new window opens with the picture, use your browser's Save command (in the File menu) to save it. If not, look in your browser's Downloads folder for the image file.
- + diff --git a/cur/teaching-guide/U1/general-support/pair-programming.html b/cur/teaching-guide/U1/general-support/pair-programming.html index c11076cb1d..930fb46010 100644 --- a/cur/teaching-guide/U1/general-support/pair-programming.html +++ b/cur/teaching-guide/U1/general-support/pair-programming.html @@ -36,7 +36,7 @@

Pair Programming: Benefits and Use

-

Pair Programming should be practiced regularly in BJC classrooms. You may wish to assign partners or to let students choose, and you may choose to have students stick with the same partner for a while or to switch every day.

+

Pair Programming is an software development technique in which two programmers work together at one workstation/computer. One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in and provides guidance. Pair programming should be practiced regularly in BJC classrooms. You may wish to assign partners or to let students choose, and you may choose to have students stick with the same partner for a while or to switch every day.

External Resources

diff --git a/cur/teaching-guide/U1/lab-pages/1-click-alonzo-game.html b/cur/teaching-guide/U1/lab-pages/1-click-alonzo-game.html index cf5e8073d7..de4750840a 100644 --- a/cur/teaching-guide/U1/lab-pages/1-click-alonzo-game.html +++ b/cur/teaching-guide/U1/lab-pages/1-click-alonzo-game.html @@ -55,7 +55,7 @@

Lab Pages

Page 1: Getting Started with Snap! -
  • Page 5: Using Pinwheel to Make Polygon.
  • +
  • + Page 7: Keeping a Programming Journal. + +
  • -

    Resources

    +

    Solutions

    diff --git a/cur/teaching-guide/U1/lab-pages/4-privacy.html b/cur/teaching-guide/U1/lab-pages/4-privacy.html index dffd4dde6d..e8e9ab3a36 100644 --- a/cur/teaching-guide/U1/lab-pages/4-privacy.html +++ b/cur/teaching-guide/U1/lab-pages/4-privacy.html @@ -124,40 +124,16 @@

    Lab Pages

    - - -
    -Why are these here? What do they have to do with privacy? -bh -

    I'm OK to cut them from this page if they really have nothing to do with privacy (have you watched them? wasn't that on your list a while ago?), but the video lists themselves also reference this lab, so maybe we need to revisit that. --MF, 5/26/20

    - -

    edX BJC Videos

    -
    - No YouTube access at your school?
    - Try these Alternate Links. -
    - -
    -

    These videos are from the edX version of BJC. They are included here as an additional resource along with the corresponding content in this course.

    - -
    -
    - -

    Resources

    + + +

    Solutions

    diff --git a/cur/teaching-guide/U1/lab-pages/5-follow-the-leader.html b/cur/teaching-guide/U1/lab-pages/5-follow-the-leader.html index 7792c05879..19579945fc 100644 --- a/cur/teaching-guide/U1/lab-pages/5-follow-the-leader.html +++ b/cur/teaching-guide/U1/lab-pages/5-follow-the-leader.html @@ -112,14 +112,14 @@

    Lab Pages

    -

    Resources

    +

    Solutions

    diff --git a/cur/teaching-guide/U1/overview.html b/cur/teaching-guide/U1/overview.html index 207b8d617a..9f4d717a86 100644 --- a/cur/teaching-guide/U1/overview.html +++ b/cur/teaching-guide/U1/overview.html @@ -14,8 +14,7 @@

    Introduction to Teacher Guide

    Welcome to the Teacher Guide for the Beauty and Joy of Computing (BJC) AP Computer Science Principles (CSP) course. This guide is designed to support high school CSP teachers with timing and activities for the BJC student materials. We start this guide by presenting our three goals: including student groups typically underrepresented in computing, preparing students to pass the AP CS Principles exam, and conveying the beauty and joy that we see in computer science.

    Goals: Equity and Inclusion

    -

    A primary goal of this course is to attract new students, especially those traditionally underrepresented in CS, to the joys and life opportunities that come with programming and computer science and to make rigorous computer science accessible and enjoyable. Please note any ways this curriculum does not meet your students' needs and any ideas you have for meeting them better, and tell the research team by using the blue feedback button.

    -
    BH, I took out "surveys" because as the project winds down, that won't be relevant. Also, we should discuss the fact that NO ONE EVER READS the blue button feedback. That's a problem in our process that we've never resolved. --MF, 11/17/19
    +

    A primary goal of this curriculum is to attract new students, especially those traditionally underrepresented in CS, to the joys and life opportunities that come with programming and computer science and to make rigorous computer science accessible and enjoyable. Please note any ways this curriculum does not meet your students' needs and any ideas you have for meeting them better, and tell the research team by using the blue feedback button.

    Resources for Recruiting Female and Underrepresented Minority Students from the College Board
    @@ -40,15 +39,15 @@

    AP CSP "Computational Thinking Practices":

    Goals: AP Computer Science Principles

    -

    Several curricula satisfy the framework for the new (starting 2020-2021) AP CS Principles exam. BJC is one. Most AP courses have specific curricula taught in similar ways at every high school where they are offered. CS Principles is different because it is equivalent to a college breadth course rather than a first course for CS majors, and there is no uniformity in how colleges teach such a course. In particular, the exam is meant to be "language agnostic," meaning that any programming language can be used in the course.

    -

    Like BJC, CSP's specific goal is to attract students in groups that are historically underrepresented in computer science. BJC is an AP course for tactical reasons: it's much easier to get high schools across the country to introduce an AP course than a non-AP course. But keep in mind that the goal is to attract students who may not view themselves as "AP kids."

    +

    Several curricula satisfy the framework for the new (starting 2020-2021) AP CS Principles exam. BJC is one. Most AP courses have specific curricula taught in similar ways at every high school where they are offered. CS Principles is different because it is equivalent to a college breadth course rather than a first course for CS majors, and there is no uniformity in how colleges teach such a course. In particular, the exam is meant to be "language agnostic," meaning that any programming language can be used in the AP CSP course.

    +

    Like BJC, CSP's specific goal is to attract students in groups that are historically underrepresented in computer science. BJC is an AP curriculum for tactical reasons: it's much easier to get high schools across the country to introduce an AP course than a non-AP course. But keep in mind that the goal is to attract students who may not view themselves as "AP kids."

    Brian, I had a little trouble understanding the previous paragraph and with it's tone, and I made some edits to improve clarity and the impression it makes. Please ensure that I haven't disrupted your intended meaning, and then remove this comment. --MF, 11/17/19

    The College Board CSP Framework sets minimum standards for each of the "Big Ideas" and "Computational Thinking Practices" listed to the right, but each curriculum has its own emphasis. BJC puts a heavy emphasis on Algorithms and Programming and the Impact of Computing. As an AP-endorsed curriculum, we cover every detail of the Framework, but no CSP curriculum follows the order of topics listed in the Framework. Instead, many Framework topics are spread throughout BJC. In this Teacher Guide, there is a teacher page for each student lab, and the last thing on each teacher page is a list of which Skills of the Computational Thinking Practices, Learning Objectives, and Essential Knowledge are found in that lab. A description of how each unit addresses the Big Ideas and the Skills of the Computational Thinking Practices is included on the Teacher Guide page for each of the first five units (Unit 1, Unit 2, Unit 3, Practice Create Task, Unit 4, Unit 5). Please note that the BJC Teacher Guide should be considered a support and that the official AP CSP Curriculum Framework is the definitive source of information about the standards, performance tasks, exam, and requirements of the course.

    In the previous paragraph, I updated the names of what BJC weights heavily to match the new framework, refined (and generalized to all providers) the language about the order of topics in the Framework, and added a disclaimer. --MF, 11/17/19

    Goals: Beauty and Joy

    -

    In addition to the AP goals and curriculum framework, BJC has one more goal: for students to come away from the course loving programming and wanting to do more of it. This doesn't mean they all have to be professional programmers or computer science majors. But everyone on the BJC team has had the experience of learning to love programming. As teachers, we've seen kids who hate school turned around by discovering programming.

    +

    In addition to the AP goals and curriculum framework, BJC has one more goal: for students to come away loving programming and wanting to do more of it. This doesn't mean they all have to be professional programmers or computer science majors. But everyone on the BJC team has had the experience of learning to love programming. As teachers, we've seen kids who hate school turned around by discovering programming.

    Most of us started by seeing computer programs as a means to an end. Our focus was on the result of running the program, rather than on the program itself. We came to see programs as potentially beautiful in themselves when we learned the technique of recursion, in which a procedure calls itself as a subprocedure. So, starting right in Unit 1, we sneak simple examples of recursion into the labs. We don't make a fuss about them, and it's not until Unit 7 (after the AP exam) that we make a serious formal presentation of the idea.

    @@ -65,13 +64,13 @@

    Pacing 

    Teaching any curriculum for the first time takes a lot more time and effort than repeated teaching of the same curriculum. Unanticipated events (snow-days, absences, school issues) can also interfere with any teacher's schedule.

    To help you make decisions when pacing gets difficult, the Teacher Guide marks some pages with an asterisk. While all of the BJC pages (except for "Optional Projects" at the end of each unit) are part of the essence of BJC (all part of learning the beauty, the joy, and the computing) if you must adjust your schedule, these are the pages that are safe to skip (safe, in that students will still be able to do later pages and will still be safe for the AP).

    Units 1 through 5 cover the basic AP content and therefore must be finished before the AP exam. Units 6-8 expand on some of the beautiful and powerful ideas of computer science that are rarely if ever seen in other AP CSP courses.

    -

    Please do not stand in front of the room talking! Teachers, especially good teachers, feel that they're not doing their job if they don't make handouts and lecture slides for each class meeting. In this course, the curriculum itself does that kind of teaching. Your job is to walk around the room, look over shoulders, and get kids unstuck, preferably by asking questions rather than by suggesting code. Every minute you spend in front of the room is a minute in which the class isn't learning the curriculum. This is one of the main reasons teachers have trouble completing the course on time.

    +

    Please do not stand in front of the room talking! Teachers, especially good teachers, feel that they're not doing their job if they don't make handouts and lecture slides for each class meeting. In BJC, the curriculum itself does that kind of teaching. Your job is to walk around the room, look over shoulders, and get kids unstuck, preferably by asking questions rather than by suggesting code. Every minute you spend in front of the room is a minute in which the class isn't learning the curriculum. This is one of the main reasons teachers have trouble completing the year of materials on time.

    Experience before formality: In particular, please do not try to explain a key idea of a lab page in the abstract, before the class has had the experience of working with the idea. In our pedagogy, such abstract presentations come after the activities that give rise to the need for an idea. (This is the pedagogic equivalent to the key computer science idea of abstraction!)

    Student Materials:

    -

    All of the required materials for this course are available online at no cost. There are the labs (at bjc.edc.org) and the textbook (at bitsbook.com/excerpts). Consider requiring students to bring an empty notebook in which to write journal entries. Any computer that runs a modern browser (not Internet Explorer; Edge is fine) is fine.

    +

    All of the required materials for this curriculum are available online at no cost. There are the labs (at bjc.edc.org) and the textbook (at bitsbook.com/excerpts). Any computer that runs a modern browser (not Internet Explorer; Edge is fine) is fine.

    -

    The title "lab" is used for all sessions of this course to emphasize the laboratory style—experimentation, discussion, interaction—both in programming and in the analysis of social implications.

    +

    The title "lab" is used to emphasize the laboratory style—experimentation, discussion, interaction—both in programming and in the analysis of social implications.

    I think basically nothing on that page applies to BJC. -bh

    Both types of labs involve classroom discussion. Read more about Facilitating a Classroom Discussion.

    -
  • Laboratory work style: Most programming labs are designed to be done by students with minimal or no instruction from the teacher. Students are often not used to starting and puzzling things out on their own; they often expect that things will be explained first and they then just practice; they often expect that they are "supposed" to be able to do every problem that is assigned; and they often assume that they are expected to work alone. This course is different. Make sure students know that working together is an important part of the course, that they can figure out a lot on their own, but that they should not be surprised or feel bad if some problems do stump them. That's completely expectable and totally fine.
  • +
  • Laboratory work style: Most programming labs are designed to be done by students with minimal or no instruction from the teacher. Students are often not used to starting and puzzling things out on their own; they often expect that things will be explained first and they then just practice; they often expect that they are "supposed" to be able to do every problem that is assigned; and they often assume that they are expected to work alone. BJC is different. Make sure students know that working together is an important part of the class, that they can figure out a lot on their own, but that they should not be surprised or feel bad if some problems do stump them. That's completely expectable and totally fine.
  • Social Implications: In the social implications labs, students confront difficult issues in computing in depth. By contrast, the daily Computing in the News is a brief presentation of current events. Social Implications labs also address the College Board's requirement for “Opportunities to Investigate Computing Innovations.”

    Often it's best to introduce a topic with some facts, but most of the time should be spent in small group discussions. In whole-class discussions, a few students often dominate while the rest of the class misses out, whereas in small group discussion, everyone participates. Resist the urge to lecture, as then nobody is discussing.

  • -
  • - Journals: Considering requiring students + Journals: Considering requiring students  to keep a journal, which should contain
    • answers to "write down..." questions in the curriculum
    • @@ -229,16 +227,14 @@

      Design Elements

  • -

    Related Resources from External Sources:

    -
    - -
    +

    Optional Teaching Resources

    +

    Teachers have asked us for additional activities, and teachers have also reported having trouble fitting the entire curriculum into a year.

    +

    In response to this feedback, we have created a variety of additional supports available on each unit's Teacher Guide overview page that include vocabulary activities, formative assessment questions, and AP CSP preparation prompts that support the Create Task. Nevertheless, we recommend that, except for the five minutes of Computing in the News, students spend the entire period, every class period, working on the labs. (Social Implications labs may require small discussion groups, but ideally in the programming labs, students get straight to work without your help. Your idea role is walking around the room, looking over shoulders, and dealing with question.) The BJC curriculum is paced for this class format.

    +

    In addition, this curriculum is designed to support students in finding the beauty and joy in actively doing computer science and reflecting on its social implications rather than feeling like they are jumping through hoops with worksheet and supplemental documents. We encourage teachers not to collect student lab work, either directly or through secondary forms. BJC assessment and grading occurs at the end of each unit, roughly once a month.

    +

    Why not grade more frequently?

    +

    Any given student may find any particular lab challenging, and that can create enough anxiety without grade anxiety. And the goals of encouraging nontraditional CS students isn't helped by insisting that everyone learn at exactly the same speed.

    +

    Because BJC students are always working in pairs and pairs are encouraged to talk to other pairs, the BJC classroom format allows students to help each other over the humps. But even with all these opportunities for support, any given students may not understand some lab until they've had time to go over it at home, too late for an end-of-period assessment.

    +
    diff --git a/cur/teaching-guide/U2/lab-pages/1-variables-games.html b/cur/teaching-guide/U2/lab-pages/1-variables-games.html index a3865003e7..b8be49e709 100644 --- a/cur/teaching-guide/U2/lab-pages/1-variables-games.html +++ b/cur/teaching-guide/U2/lab-pages/1-variables-games.html @@ -141,16 +141,8 @@

    Lab Pages

    - -

    Resources

    -
    - -
    - + +

    Solutions

    diff --git a/cur/teaching-guide/U2/lab-pages/2-data-art.html b/cur/teaching-guide/U2/lab-pages/2-data-art.html index 7a89606d99..726ef6b411 100644 --- a/cur/teaching-guide/U2/lab-pages/2-data-art.html +++ b/cur/teaching-guide/U2/lab-pages/2-data-art.html @@ -146,15 +146,6 @@

    Lab Pages

    - -

    Resources

    -
    - -

    Solutions

    diff --git a/cur/teaching-guide/U2/lab-pages/3-predicates-game.html b/cur/teaching-guide/U2/lab-pages/3-predicates-game.html index 881e8ccec0..c4e867389b 100644 --- a/cur/teaching-guide/U2/lab-pages/3-predicates-game.html +++ b/cur/teaching-guide/U2/lab-pages/3-predicates-game.html @@ -170,16 +170,6 @@

    Lab Pages

    - -

    Resources

    -
    - -
    -

    Solutions

    diff --git a/cur/teaching-guide/U2/lab-pages/4-making-computers-do-math.html b/cur/teaching-guide/U2/lab-pages/4-making-computers-do-math.html index ab774f7b8c..5ad68ffd63 100644 --- a/cur/teaching-guide/U2/lab-pages/4-making-computers-do-math.html +++ b/cur/teaching-guide/U2/lab-pages/4-making-computers-do-math.html @@ -104,23 +104,7 @@

    Lab Pages

    - - - - -

    Resources

    -
    - -
    +

    Solutions

    diff --git a/cur/teaching-guide/U2/lab-pages/5-copyrights.html b/cur/teaching-guide/U2/lab-pages/5-copyrights.html index 08c206f0de..64ca097cfb 100644 --- a/cur/teaching-guide/U2/lab-pages/5-copyrights.html +++ b/cur/teaching-guide/U2/lab-pages/5-copyrights.html @@ -121,14 +121,7 @@

    Lab Pages

    -

    Resources

    -
    - -
    +

    Solutions

    There are no exercises for which solutions would be needed.

    diff --git a/cur/teaching-guide/U3/lab-pages/1-layers-abstraction.html b/cur/teaching-guide/U3/lab-pages/1-layers-abstraction.html index 612bc11639..77439281bd 100644 --- a/cur/teaching-guide/U3/lab-pages/1-layers-abstraction.html +++ b/cur/teaching-guide/U3/lab-pages/1-layers-abstraction.html @@ -209,6 +209,15 @@

    BJC Videos from UC Berkeley

  • Abstraction: Power, Limitations
  • + +

    Solutions

    diff --git a/cur/teaching-guide/U3/lab-pages/2-contact-list.html b/cur/teaching-guide/U3/lab-pages/2-contact-list.html index 3f3326f431..00c9f677c2 100644 --- a/cur/teaching-guide/U3/lab-pages/2-contact-list.html +++ b/cur/teaching-guide/U3/lab-pages/2-contact-list.html @@ -171,6 +171,16 @@

    Lab Pages

    + + +

    Solutions

    diff --git a/cur/teaching-guide/U3/lab-pages/3-tic-tac-toe.html b/cur/teaching-guide/U3/lab-pages/3-tic-tac-toe.html index 28d2b30cd9..57860555ee 100644 --- a/cur/teaching-guide/U3/lab-pages/3-tic-tac-toe.html +++ b/cur/teaching-guide/U3/lab-pages/3-tic-tac-toe.html @@ -125,6 +125,14 @@

    Lab Pages

    +

    Solutions

    diff --git a/cur/teaching-guide/U3/lab-pages/4-robots-ai.html b/cur/teaching-guide/U3/lab-pages/4-robots-ai.html index 05a8e4e124..18b296b59d 100644 --- a/cur/teaching-guide/U3/lab-pages/4-robots-ai.html +++ b/cur/teaching-guide/U3/lab-pages/4-robots-ai.html @@ -211,11 +211,17 @@

    Lab Pages

    --> -

    edX BJC Videos

    -
    +

    BJC Videos from UC Berkeley

    +
    No YouTube access at your school?
    - Try these Alternate Links. -
    + +
    +

    Solutions

    diff --git a/cur/teaching-guide/U3/lab-pages/5-work.html b/cur/teaching-guide/U3/lab-pages/5-work.html index 97d39fef38..1c91769adb 100644 --- a/cur/teaching-guide/U3/lab-pages/5-work.html +++ b/cur/teaching-guide/U3/lab-pages/5-work.html @@ -113,6 +113,7 @@

    Lab Pages

  • Page 3: Working Remotely. +
    Mary to review BH additions here. --MF, 6/27/21
    --> - + +

    Solutions

    diff --git a/cur/teaching-guide/U4/lab-pages/2-cybersecurity.html b/cur/teaching-guide/U4/lab-pages/2-cybersecurity.html index 687acd44e9..6f6943b655 100644 --- a/cur/teaching-guide/U4/lab-pages/2-cybersecurity.html +++ b/cur/teaching-guide/U4/lab-pages/2-cybersecurity.html @@ -173,11 +173,18 @@

    Related Resources

    - + +

    Solutions

    -

    Correlation with 2020 AP CS Principles Framework 

    Computational Thinking Practices: Skills

    diff --git a/cur/teaching-guide/U4/lab-pages/3-community.html b/cur/teaching-guide/U4/lab-pages/3-community.html index 96a9cb419d..9ea436ea0c 100644 --- a/cur/teaching-guide/U4/lab-pages/3-community.html +++ b/cur/teaching-guide/U4/lab-pages/3-community.html @@ -225,12 +225,19 @@

    Lab Pages

  • - - + + +

    Solutions

    There are no exercises for which solutions would be needed.

    - - +

    Correlation with 2020 AP CS Principles Framework 

    Computational Thinking Practices: Skills

    diff --git a/cur/teaching-guide/U4/lab-pages/4-data-representation.html b/cur/teaching-guide/U4/lab-pages/4-data-representation.html index 34f1bc3b0a..06fc3c59d7 100644 --- a/cur/teaching-guide/U4/lab-pages/4-data-representation.html +++ b/cur/teaching-guide/U4/lab-pages/4-data-representation.html @@ -165,42 +165,51 @@

    Lab Pages

    -
    -

    These don't seem to belong here... --MF, 11/17/19

    -

    edX BJC Videos

    -
    Both video lists need attention for new structure of course. --MF, 6/13/19
    -
    If your connection blocks YouTube, watch the videos here: Abstraction: Numbers, Abstraction: Base Conversion.
    +

    BJC Videos from UC Berkeley

    +
    + No YouTube access at your school?
    + +
    • Abstraction: Numbers
        -
      • 0:00 to 3:14 covers converting binary to decimal (most related to page 5)
      • -
      • 3:12 to 4:55 covers converting hex to decimal (most related to page 6)
      • -
      • 4:55 to the end compares these notations and covers examples of their uses (most related to page 7)
      • -
      • If you use this with students, you may wish to validate students' mathematical experience by remarking that not everyone learns base 10 place values in kindergarten, as stated at 1:07.
      • -
      • There is a mistake in the video at 2:51. If you share this video with students, you might tell them that there is a mistake somewhere and ask them to watch carefully to find it.
      • +
      • The first 3 minutes and 14 seconds covers converting binary to decimal (most related to page 5). The remainder of the video covers hexadecimal, which is not covered in this lab, and compares these notations and covers examples of their uses.
      • +
      • If you share this video with students... +
          +
        • You may wish to validate students' mathematical experience by remarking that not everyone learns base 10 place values in kindergarten, as stated at 1:07.
        • +
        • There is a mistake in the video at 2:51. You might ask students to watch carefully to find it.
        • +
        +
    • Abstraction: Base Conversion
        -
      • 0:00 to 3:14 covers converting decimal to binary (most related to page 5)
      • -
      • 3:14 to 4:38 covers converting decimal to hex (most related to page 6)
      • -
      • 4:38 to the end covers converting between binary and hex (most related to page 7)
      • -
      • At this point in the course, this is not your student's first algorithm, as stated at 0:13.
      • -
      • This video uses the notation "0b" and "0x" at the beginning of a number to indicate that the number is represented in binary or in hex (e.g., 0b1101 or 0xA5). This curriculum uses "2" or "16" at the end of the number (e.g., 11012 or A516). Both are correct. Some programming languages use the "0b" and "0x" notation, whereas subscripts are more commonly used in text written for humans.
      • +
      • The first 3 minutes and 14 seconds covers converting decimal to binary (most related to page 5). The remainder of the video covers hexadecimal, which is not covered in this lab.
      • +
      • At this point in the course, this is not your student's first algorithm, as stated at 0:13
    - + +

    Solutions

    - - +

    Correlation with 2020 AP CS Principles Framework 

    Computational Thinking Practices: Skills

    diff --git a/cur/teaching-guide/U5/lab-pages/1-algorithms.html b/cur/teaching-guide/U5/lab-pages/1-algorithms.html index 9d6bb29214..f88ab61ae9 100644 --- a/cur/teaching-guide/U5/lab-pages/1-algorithms.html +++ b/cur/teaching-guide/U5/lab-pages/1-algorithms.html @@ -333,31 +333,7 @@

    Lab Pages

    - - -
    -

    edX BJC Videos

    -
    - No YouTube access at your school?
    - Try these Alternate Links. -
    -
    - -
    -
    +

    Solutions

    diff --git a/cur/teaching-guide/U5/lab-pages/3-turning-data-information.html b/cur/teaching-guide/U5/lab-pages/3-turning-data-information.html index 5f113b6878..c0315d018d 100644 --- a/cur/teaching-guide/U5/lab-pages/3-turning-data-information.html +++ b/cur/teaching-guide/U5/lab-pages/3-turning-data-information.html @@ -154,6 +154,7 @@

    Lab Pages

    @@ -181,10 +182,16 @@

    Lab Pages

    -

    edX BJC Videos

    -
    +

    BJC Videos from UC Berkeley

    +
      diff --git a/cur/teaching-guide/U5/lab-pages/4-unsolvable-undecidable-problems.html b/cur/teaching-guide/U5/lab-pages/4-unsolvable-undecidable-problems.html index ca185665be..381a2351d8 100644 --- a/cur/teaching-guide/U5/lab-pages/4-unsolvable-undecidable-problems.html +++ b/cur/teaching-guide/U5/lab-pages/4-unsolvable-undecidable-problems.html @@ -86,16 +86,18 @@

      Lab Pages

    -

    edX BJC Videos

    -
    +

    BJC Videos from UC Berkeley

    +
    No YouTube access at your school?
    - Try these Alternate Links. -
    + +
    diff --git a/cur/teaching-guide/U6/lab-pages/1-computer-abstraction-hierarchy.html b/cur/teaching-guide/U6/lab-pages/1-computer-abstraction-hierarchy.html index 4c745d3f6a..0d92f4b3c0 100644 --- a/cur/teaching-guide/U6/lab-pages/1-computer-abstraction-hierarchy.html +++ b/cur/teaching-guide/U6/lab-pages/1-computer-abstraction-hierarchy.html @@ -306,81 +306,7 @@

    Lab Pages

    Solutions

    -
    - -

    Correlation with AP CS Principles Framework 

    -
    - -

    Enduring Understandings:

    -

    Students learn about software applications, their uses in creative expression and human experience (EU 1.2, EU 1.3, and EU 5.4), and impacts of software on society, entertainment, medicine, business, politics, and science (EU 7.2). They then learn about the general characteristics of programming languages used to write applications (EU 4.1) and the abstractions, including libraries and operating systems, on which programming relies (EU 2.2 and EU 5.3). Students learn that arithmetic and Boolean operators are included in nearly all languages and learn about logic gates, which emulate Boolean operators in circuitry (EU 5.5). This lab builds toward these EUs by presenting the three domains of the computer abstraction hierarchy (the software domain, the digital domain, and the analog domain) and selected levels of hierarchy within them.

    -
      -
    • EU 1.2 Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem.
    • -
    • EU 1.3 Computing can extend traditional forms of human expression and experience.
    • -
    • EU 2.2 Multiple levels of abstraction are used to write programs or create other computational artifacts.
    • -
    • EU 4.1 Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
    • -
    • EU 5.3 Programming is facilitated by appropriate abstractions.
    • -
    • EU 5.4 Programs are developed, maintained, and used by people for different purposes.
    • -
    • EU 5.5 Programming uses mathematical and logical concepts.
    • -
    • EU 7.2 Computing enables innovation in nearly every field.
    • -
    -

    Learning Objectives:

    -

    Students answer several online multiple-choice questions with built-in feedback that address the level of abstraction of programming languages (LO 2.2.3).

    -
      -
    • LO 2.2.3 Identify multiple levels of abstractions that are used when writing programs. [P3]
    • -
      -

      - In U1, U2, U3, and U5, but not here. (Listed on PT TG page, so that's ok for now.) Need to list in appropriate units too eventually. --MF, 12/18/17 -

      • L O 4.1.2 Express an algorithm in a language. [P5]
      -

      -

      - In 5.1, but might need some attention there. --MF, 12/18/17 -

      • L O 5.2.1 Explain how programs implement algorithms. [P3]
      -

      -

      - BRIAN, I cut this one because I think 6.3 is a stronger location for this LO, and it already has problems for it. --MF, 12/19/17 -

      • L O 7.2.1 Explain how computing has impacted innovations in other fields. [P1]
      -

      -
      -
    -

    Essential Knowledge:

    -
      -
    • EK 1.3.1A Creating digital effects, images, audio, video, and animations has transformed industries.
    • -
    • EK 1.3.1B Digital audio and music can be created by synthesizing sounds, sampling existing audio and music, and recording and manipulating sounds, including layering and looping.
    • -
    • EK 1.3.1C Digital images can be created by generating pixel patterns, manipulating existing digital images, or combining images.
    • -
    • EK 2.2.2A Software is developed using multiple levels of abstractions, such as constants, expressions, statements, procedures, and libraries.
    • -
    • EK 2.2.3A Different programming languages offer different levels of abstraction.
    • -
    • EK 2.2.3B High level programming languages provide more abstractions for the programmer and make it easier for people to read and write a program.
    • -
    • EK 2.2.3C Code in a programming language is often translated into code in another (lower-level) language to be executed on a computer.
    • -
    • EK 2.2.3D In an abstraction hierarchy, higher levels of abstraction (the most general concepts) would be placed toward the top and lower level abstractions (the more specific concepts) toward the bottom.
    • -
    • EK 2.2.3E Binary data is processed by physical layers of computing hardware, including gates, chips, and components.
    • -
    • EK 2.2.3F A logic gate is a hardware abstraction that is modeled by a Boolean function.
    • -
    • EK 2.2.3G A chip is an abstraction composed of low level components and circuits that perform a specific function.
    • -
    • EK 2.2.3H A hardware component can be low level like a transistor or high level like a video card.
    • -
    • EK 2.2.3I Hardware is built using multiple levels of abstractions, such as transistors, logic gates, chips, memory, motherboards, special purposes cards, and storage devices.
    • -
    • EK 2.2.3J Applications and systems are designed, developed, and analyzed using levels of hardware, software, and conceptual abstractions.
    • -
    • EK 4.1.2C Algorithms described in programming languages can be executed on a computer.
    • -
    • EK 4.1.2D Different languages are better suited for expressing different algorithms.
    • -
    • EK 4.1.2E Some programming languages are designed for specific domains and are better for expressing algorithms in those domains.
    • -
    • EK 4.1.2F The language used to express an algorithm can affect characteristics such as clarity or readability but not whether an algorithmic solution exists.
    • -
    • EK 4.1.2H Nearly all programming languages are equivalent in terms of being able to express any algorithm.
    • -
    • EK 4.1.2I Clarity and readability are important considerations when expressing an algorithm in a language.
    • -
    • EK 5.1.1E A computer program or the results of running a program may be rapidly shared with a large number of users and can have widespread impact on individuals, organizations, and society.
    • -
    • EK 5.1.1F Advances in computing have generated and increased creativity in other fields.
    • -
    • EK 5.2.1F Processes use memory, a central processing unit (CPU), and input and output.
    • -
    • EK 5.2.1G A process may execute by itself or with other processes.
    • -
    • EK 5.2.1H A process may execute on one or several CPUs.
    • -
    • EK 5.3.1M Application program interfaces (APIs) and libraries simplify complex programming tasks.
    • -
    • EK 5.3.1N Documentation for an API/library is an important aspect of programming.
    • -
    • EK 5.5.1D Mathematical expressions using arithmetic operators are part of most programming languages.
    • -
    • EK 5.5.1E Logical concepts and Boolean algebra are fundamental to programming.
    • -
    • EK 5.5.1F Compound expressions using and, or, and not are part of most programming languages.
    • -
    • EK 7.2.1A Machine learning and data mining have enabled innovation in medicine, business, and science.
    • -
    • EK 7.2.1C Computing enables innovation by providing access to and sharing of information.
    • -
    -
    +
    diff --git a/cur/teaching-guide/U6/lab-pages/2-history-impact-computers.html b/cur/teaching-guide/U6/lab-pages/2-history-impact-computers.html index aec506fe77..65370a8fcc 100644 --- a/cur/teaching-guide/U6/lab-pages/2-history-impact-computers.html +++ b/cur/teaching-guide/U6/lab-pages/2-history-impact-computers.html @@ -100,82 +100,7 @@

    Lab Pages

    Solutions

    -
    - - -

    Correlation with AP CS Principles Framework 

    -
    - -

    Enduring Understandings:

    -

    Students learn how modern computing influences human communication, collaboration, infrastructure, and learning (EU 7.1). They learn how machine learning and data mining enable innovation,. how computer modeling and simulation improve experimentation and theory testing, and how the explosive growth in computing power has enabled this (EU 7.2). They consider some of the legal and ethical questions raise by widespread access to digitized information (EU 7.3), and consider issues of equity, access, and power that arise with computing innovations (EU 7.4). This lab builds toward these EUs by focusing on how technology has changed the way people identify problems, develop solutions, and share results and presents examples in entertainment, education, medicine, society, business, and science.

    -
      -
    • EU 7.1 Computing enhances communication, interaction, and cognition.
    • -
    • EU 7.2 Computing enables innovation in nearly every field.
    • -
    • EU 7.3 Computing has global effects — both beneficial and harmful — on people and society.
    • -
    • EU 7.4 Computing innovations influence and are influenced by the economic, social, and cultural contexts in which they are designed and used.
    • -
    -

    Learning Objectives:

    -

    Students discuss and write about how computing innovations have changed human communication, interaction, thought, and learning (LO 7.1.1), how people use technology to solve problems collaboratively (LO 7.1.2), how computing has influenced innovations in other fields (LO 7.2.1), the benefits and harms of a complex issue in computing (LO 7.3.1), and connections between computing and the real-world (LO 7.4.1).

    -
      -
    • LO 7.1.1 Explain how computing innovations affect communication, interaction, and cognition. [P4]
    • -
    • LO 7.1.2 Explain how people participate in a problem-solving process that scales. [P4]
    • -
    • LO 7.2.1 Explain how computing has impacted innovations in other fields. [P1]
    • -
    • LO 7.3.1 Analyze the beneficial and harmful effects of computing. [P4]
    • -
    • LO 7.4.1 Explain the connections between computing and real-world contexts, including economic, social, and cultural contexts. [P1]
    • -
    -

    Essential Knowledge:

    -
      -
    • EK 1.3.1E Computing enables creative exploration of both real and virtual phenomena.
    • -
    • EK 5.2.1H A process may execute on one or several CPUs.
    • -
    • EK 5.2.1K Improvements in algorithms, hardware, and software increase the kinds of problems and the size of problems solvable by programming.
    • -
    • EK 7.1.1A Email, short message service (SMS), and chat have fostered new ways to communicate and collaborate.
    • -
    • EK 7.1.1B Video conferencing and video chat have fostered new ways to communicate and collaborate.
    • -
    • EK 7.1.1C Social media continues to evolve and fosters new ways to communicate.
    • -
    • EK 7.1.1D Cloud computing fosters new ways to communicate and collaborate.
    • -
    • EK 7.1.1E Widespread access to information facilitates the identification of problems, development of solutions, and dissemination of results.
    • -
    • EK 7.1.1F Public data provides widespread access and enables solutions to identified problems.
    • -
    • EK 7.1.1G Search trends are predictors.
    • -
    • EK 7.1.1H Social media, such as blogs and Twitter, have enhanced dissemination.
    • -
    • EK 7.1.1I Global Positioning System (GPS) and related technologies have changed how humans travel, navigate, and find information related to geolocation.
    • -
    • EK 7.1.1J Sensor networks facilitate new ways of interacting with the environment and with physical systems.
    • -
    • EK 7.1.1K Smart grids, smart buildings, and smart transportation are changing and facilitating human capabilities.
    • -
    • EK 7.1.1L Computing contributes to many assistive technologies that enhance human capabilities.
    • -
    • EK 7.1.1M The Internet and the Web have enhanced methods of and opportunities for communication and collaboration.
    • -
    • EK 7.1.1N The Internet and the Web have changed many areas, including e-commerce, health care, access to information and entertainment, and online learning.
    • -
    • EK 7.1.1O The Internet and the Web have impacted productivity, positively and negatively, in many areas.
    • -
    • EK 7.1.2A Distributed solutions must scale to solve some problems.
    • -
    • EK 7.1.2B Science has been impacted by using scale and 'citizen science' to solve scientific problems using home computers in scientific research.
    • -
    • EK 7.1.2C Human computation harnesses contributions from many humans to solve problems related to digital data and the Web.
    • -
    • EK 7.1.2D Human capabilities are enhanced by digitally enabled collaboration.
    • -
    • EK 7.1.2E Some online services use the contributions of many people to benefit both individuals and society.
    • -
    • EK 7.1.2F Crowdsourcing offers new models for collaboration, such as connecting people with jobs and businesses with funding.
    • -
    • EK 7.2.1A Machine learning and data mining have enabled innovation in medicine, business, and science.
    • -
    • EK 7.2.1B Scientific computing has enabled innovation in science and business.
    • -
    • EK 7.2.1C Computing enables innovation by providing access to and sharing of information.
    • -
    • EK 7.2.1D Open access and Creative Commons have enabled broad access to digital information.
    • -
    • EK 7.2.1E Open and curated scientific databases have benefited scientific researchers.
    • -
    • EK 7.2.1F Moore's law has encouraged industries that use computers to effectively plan future research and development based on anticipated increases in computing power.
    • -
    • EK 7.2.1G Advances in computing as an enabling technology have generated and increased the creativity in other fields.
    • -
    • EK 7.3.1A Innovations enabled by computing raise legal and ethical concerns.
    • -
    • EK 7.3.1B Commercial access to music and movie downloads and streaming raises legal and ethical concerns.
    • -
    • EK 7.3.1C Access to digital content via peer-to-peer networks raises legal and ethical concerns.
    • -
    • EK 7.3.1D Both authenticated and anonymous access to digital information raise legal and ethical concerns.
    • -
    • EK 7.3.1E Commercial and governmental censorship of digital information raise legal and ethical concerns.
    • -
    • EK 7.3.1F Open source and licensing of software and content raise legal and ethical concerns.
    • -
    • EK 7.3.1N Widespread access to digitized information raises questions about intellectual property.
    • -
    • EK 7.3.1O Creation of digital audio, video, and textual content by combining existing content has been impacted by copyright concerns.
    • -
    • EK 7.3.1P The Digital Millennium Copyright Act (DMCA) has been a benefit and a challenge in making copyrighted digital material widely available.
    • -
    • EK 7.3.1Q Open source and free software have practical, business, and ethical impacts on widespread access to programs, libraries, and code.
    • -
    • EK 7.4.1A The innovation and impact of social media and online access varies in different countries and in different socioeconomic groups.
    • -
    • EK 7.4.1B Mobile, wireless, and networked computing have an impact on innovation throughout the world.
    • -
    • EK 7.4.1C The global distribution of computing resources raises issues of equity, access, and power.
    • -
    • EK 7.4.1D Groups and individuals are affected by the "digital divide" — differing access to computing and the Internet based on socioeconomic or geographic characteristics.
    • -
    • EK 7.4.1E Networks and infrastructure are supported by both commercial and governmental initiatives.
    • -
    -
    +
    diff --git a/cur/teaching-guide/U7/lab-pages/1-trees-in-a-forest.html b/cur/teaching-guide/U7/lab-pages/1-trees-in-a-forest.html index 166fe1efe6..aa02008ddf 100644 --- a/cur/teaching-guide/U7/lab-pages/1-trees-in-a-forest.html +++ b/cur/teaching-guide/U7/lab-pages/1-trees-in-a-forest.html @@ -148,8 +148,9 @@

    Related Resources:

    These resources spend a lot of time with examples that could be done iteratively. They are provided as additional reading for teachers but not recommended for students.

    diff --git a/cur/teaching-guide/resources/standards-map.html b/cur/teaching-guide/resources/standards-map.html index 9e490137d2..e74ef739c0 100644 --- a/cur/teaching-guide/resources/standards-map.html +++ b/cur/teaching-guide/resources/standards-map.html @@ -7,6 +7,7 @@ + Go to Teacher Resources

    Mapping from AP CSP Standards to BJC

    This document is designed to help teachers determine where various pieces of the College Board AP Computer Science Principles standards are covered in BJC. Please see the AP Computer Science Principles Course and Exam Description on the AP CSP website for details on the contents of the standards.

    @@ -48,7 +49,7 @@

    CRD-1 

  • CRD-1.B.2: Unit 1, Lab 2, Page 1, text just before "How not to do pair programming" section
  • -
  • CRD-1.C: Unit 1, Lab 2, Page 1, problem 1 +
  • CRD-1.C: Unit 1, Lab 2, Page 1, problem 1 @@ -69,7 +70,7 @@

    CRD-2 

  • CRD-2.B: Unit 1, Lab 2, Page 5, problem 9
  • - CRD-2.H: Practice Create Task, Page 3, text between problem 3 + CRD-2.H: Practice Create Task, Page 3, problem 3
  • - DAT-2.B: Unit 5, Page 3, Lab 6, problem 1 + DAT-2.B: Unit 5, Lab 3, Page 6, problem 1
  • @@ -247,7 +248,7 @@

    DAT-2 

  • - DAT-2.D: Unit 5, Lab 3, Page 4, problems 3 and 4 + DAT-2.D: Unit 5, Lab 3, Page 4, problems 3 and 4
  • @@ -54,7 +54,7 @@

    Creating Script Pics

    Exporting All the Images at Once

    - You can download an HTML file of all of the blocks in your whole project as well as a picture of the stage by selecting "Export summary..." from the Snap! File menu (File button). The HTML file also land in your browser's Downloads folder. Open it (in a browser), right-click (or control-click on a mac) to copy the images you need, and paste them into the document where you are describing your code.
    + You can download an HTML file of all of the blocks in your whole project as well as a picture of the stage by selecting "Export summary..." from the Snap! File menu (File button). The HTML file also land in your browser's Downloads folder. Open it (in a browser), right-click (or control-click on a Mac) to copy the images you need, and paste them into the document where you are describing your code.
    image of Snap! file menu open with mouse over 'Export summary...' There is a balloon showing above the pointer that says, 'open a new browser browser window with a summary of the project'

    diff --git a/cur/performance-tasks/create-task/3-implementing.html b/cur/performance-tasks/create-task/3-implementing.html index 54a17ffca3..cf5261a25a 100644 --- a/cur/performance-tasks/create-task/3-implementing.html +++ b/cur/performance-tasks/create-task/3-implementing.html @@ -43,15 +43,17 @@

    Implementing Your Development Process

    CRD-2.H.1, CRD-2.H.2 ("The College Board is very particular")
    -
    Brian, you made this an "exam" box, and I have no problem with that characterization, in theory, but this isn't about the "exam;" it's about the "create task," and I don't want to confuse people. --MF, 9/2/19
    - Orange boxes are for important computer science ideas. This isn't important, isn't computer science, and isn't an idea. The create task is part of the exam! -bh
    - The College Board is very particular about acknowledging content that you did not develop yourself. You are probably familiar with using quotation marks around text that you didn't write and with creating a bibliography, but for the Create Task, you also need to acknowledge code that other people wrote or even helped you write. This acknowledgment must include either where you got the code or who wrote it, and it should be included in your program documentation.
    +

    The College Board is very particular about acknowledging content that you did not develop yourself. You are probably familiar with using quotation marks around text that you didn't write and with creating a bibliography, but for the Create Task, you also need to acknowledge code that other people wrote or even helped you write. This acknowledgment must include either where you got the code or who wrote it, and it should be included in your program documentation.

    +
      CRD-2.H ("Develop a prototype")
    1. Develop a prototype to meet your specifications. As you do, keep track of any pieces of code that were written by someone else (either using Snap! comments or in another document).
    +
    +

    The Create Task requires you to include a list and identify it by name, but in Snap!, lists aren't necessarily named. To receive full credit, be sure to make a variable to store your list and refer to your list by its variable name in your written response. The exam graders need to understand what you are referring to.

    +
    diff --git a/cur/programming/1-introduction/1-building-an-app/1-creating-a-snap-account.html b/cur/programming/1-introduction/1-building-an-app/1-creating-a-snap-account.html index 5c1c36a176..082614b0d3 100644 --- a/cur/programming/1-introduction/1-building-an-app/1-creating-a-snap-account.html +++ b/cur/programming/1-introduction/1-building-an-app/1-creating-a-snap-account.html @@ -19,12 +19,12 @@

    Creating an Account

    1. If you haven't already opened snap, open it now: http://snap.berkeley.edu/run
    2. - In the Snap! window, click the Cloud menu, Cloud button, select "Signup...", and follow the instructions.
      + In the Snap! window, click the Cloud menu, Cloud menu button, select "Signup...", and follow the instructions.
      cloud icon
    3. You'll be asked to click a link in your email to verify your account, but you don't have to do that right now.

      -

      You may change your password at any time using the Cloud menu, Cloud button.

      +

      You may change your password at any time using the Cloud menu, Cloud menu button.

    diff --git a/cur/programming/1-introduction/1-building-an-app/2-start-your-first-snap-app.html b/cur/programming/1-introduction/1-building-an-app/2-start-your-first-snap-app.html index dea5abcc82..07d1576a07 100644 --- a/cur/programming/1-introduction/1-building-an-app/2-start-your-first-snap-app.html +++ b/cur/programming/1-introduction/1-building-an-app/2-start-your-first-snap-app.html @@ -29,7 +29,7 @@

    Making a Character Move

    Click here to load this file. Then save it to your Snap! account.

    Saving a Snap! Project

    -

    Choose "Save" from the Snap! File menu, File button.

    +

    Choose "Save" from the Snap! File menu, File menu button.

    @@ -47,8 +47,8 @@

    Saving a Snap! Project

    1. -
      -
      + As a first step, make Alonzo jump someplace else on the stage when he's clicked. Drag these two blocks into the scripting area (the center area of the window):
      Palette categories: Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables @@ -68,8 +68,8 @@

      Saving a Snap! Project

    -
    -
    +

    Orange boxes contain the ideas you should still remember three years from now.

    when i am (clicked) @@ -89,13 +89,13 @@

    Saving a Snap! Project

    1. - Choose "Save" from the Snap! File menu, File button. + Choose "Save" from the Snap! File menu, File menu button.

    Making the Game Challenging

    -
    +

    The game isn't much fun if Alonzo just sits there waiting to be clicked. Once you've clicked him, he should keep jumping around on his own. To make Alonzo keep moving around, you need a block that says "do this forever." And there is a block that does it:
    forever @@ -119,7 +119,7 @@

    Making the Game Challenging

  • -
    + Alonzo moves too fast. Use the wait 1 secs block to slow him down. Try your program, and increase or reduce the wait time if you like.
    Where the wait block goes in your script matters. Do you want the script to wait one time or each time Alonzo moves? diff --git a/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.html b/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.html index 70d1a35b75..0f0a462546 100644 --- a/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.html +++ b/cur/programming/1-introduction/1-building-an-app/3-loading-mobile-device.html @@ -18,7 +18,7 @@

    Creating a Link

    Open Project dialog box
    1. Make sure your project is saved.
    2. -
    3. Choose "Open..." from the Snap! File menu, File button.
    4. +
    5. Choose "Open..." from the Snap! File menu, File menu button.
    6. Select the project you want to share from the project list (your current project is likely named "U1L1-ClickAlonzo").
    7. To locate a file, you can type in the search bar at the top to see only a list of matching files (see the example on the right, where only "U1" files are shown).
    8. Click "Share," and then click "Yes" to share. Then click "Cancel" to close the menu.
    9. diff --git a/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html b/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html index 05c30f61d3..c91adcf744 100644 --- a/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html +++ b/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html @@ -27,7 +27,7 @@

      Confirming Whether Alonzo Was Clicked

      Program Alonzo to face the other way when clicked. Alonzo character Alonzo character flipped to face the other way - +
      1. The project you loaded has two Alonzo costumes—one facing right and the other facing left—so you can use the next costume block to make the sprite face the other way. Add the next costume block to the place in your program where the user has just clicked on Alonzo.
      2. Test your program. Make sure Alonzo faces the other way when he is clicked but not when he jumps without being clicked.
      3. @@ -35,7 +35,7 @@

        Confirming Whether Alonzo Was Clicked

    Keeping Score

    -
    +

    The player will also want to know how much progress they have made in the game. The command change (ghost) effect by () can control Alonzo's transparency.

    @@ -45,7 +45,7 @@

    Keeping Score

    Use transparency to tell the user how close they are to winning: every time they click, Alonzo gets more invisible, and when he disappears completely, they win the game.

    -
    +
    1. Drag the change (ghost) effect block into the center scripting area, and experiment with different input numbers (clicking it repeatedly after each change) to see exactly what it does. At what ghost effect value does Alonzo become completely invisible? You can use the command clear graphic effects to make Alonzo fully opaque again.
    2. Then, modify your script so that every time Alonzo is clicked, he gets a little more ghostly. Think about how the input you use affects the length of the game. Try out your game.
    3. diff --git a/cur/programming/1-introduction/1-building-an-app/5-finish-your-first-snap-app.html b/cur/programming/1-introduction/1-building-an-app/5-finish-your-first-snap-app.html index b6781f15f1..e5078aa77f 100644 --- a/cur/programming/1-introduction/1-building-an-app/5-finish-your-first-snap-app.html +++ b/cur/programming/1-introduction/1-building-an-app/5-finish-your-first-snap-app.html @@ -22,7 +22,7 @@

      Improving Your Game

        -
        +
      1. Create a second script that makes Alonzo say () a welcome message when the green flag is clicked. (Alonzo might say, "Welcome to 'Click Alonzo!' Keep clicking me if you can!")
      2. diff --git a/cur/programming/1-introduction/1-building-an-app/old/3-pair-programming-swap.html b/cur/programming/1-introduction/1-building-an-app/old/3-pair-programming-swap.html index bb4217b2a2..88798c3a7e 100644 --- a/cur/programming/1-introduction/1-building-an-app/old/3-pair-programming-swap.html +++ b/cur/programming/1-introduction/1-building-an-app/old/3-pair-programming-swap.html @@ -26,7 +26,7 @@

        Saving Your Work

        If you have not already created an account, do that now.
        -->
          AAP-3.A.6
          There is nothing exactly like say (gossip) or say (gossip) for (3) secs on the AP Exam because they don't have sprites and speech balloons, but their way of showing this text to the user is @@ -88,12 +87,14 @@

          Exploring a Second Sprite 

          Save your work Make Sprite(2) tell Sprite to respond. What happens? + + +
           

          - The broadcast block sends a message to all the sprites. To set the message, click the down arrow and select "new..."
          + The broadcast block sends a message to all the sprites. To set the message, click the down arrow and select "new..."
          broadcast block with menu open showing two options: your turn, new...

          -

          For more information about the when I receive block, right-click (or control-click on a Mac) the block and select "help..."
          when I receive block with right-click menu open showing four options: help..., duplicate, delete, script pic... diff --git a/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html b/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html index 8d312424e2..da919516e1 100644 --- a/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html +++ b/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html @@ -52,7 +52,7 @@

          How to Edit a Block

          : Lists, Strings, and Concatenation
            -
            +
            AAP-1.C.1 first sentence
          • A list is an ordered set of items. You've seen this example:
            @@ -65,8 +65,8 @@

            How to Edit a Block

          -
          -
          +

            The process of testing, finding problems, and fixing them is called debugging.

            @@ -135,9 +135,9 @@

            Adding a Costume

            Fix any issues with your costumes.

            Adjusting a Costume

            -
            +
            • You can change the size of your sprite using set size to ( ) %.
            • You can change the position of your sprite using go to x: () y: ().
            • diff --git a/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html b/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html index 90fa43c207..fdeb42f30c 100644 --- a/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html +++ b/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html @@ -28,7 +28,7 @@

              Making Your Own Block

              Making a New Block

                - image of 'Make a block' dialog box with palette with 10 menus (Motion, Looks, Sound, Pen, Lists, Control, Sensing, Operators, Variables, Other) labeled 'Choose a color (a palette)'; a text box labeled 'Type a title for your block.'; three block shape options (puzzle-shaped/'Command', oval/'Reporter', and hexagonal/'Predicate') labeled 'Select a shape.'; two radio boxes ('for all sprites', which is checked, and 'for this sprite only', which is not checked) with no label; and two buttons (OK and Cancel) labeled 'Click OK.' + image of 'Make a block' dialog box with 10 palette menus (Motion, Looks, Pen, Sound, Lists, Control, Sensing, Operation, Variables, Other) labeled 'Choose a color (a palette)'; a text box labeled 'Type a title for your block.'; three block shape options (puzzle-shaped/'Command', oval/'Reporter', and hexagonal/'Predicate') labeled 'Select a shape.'; two radio boxes (for all sprites, which is checked, and for this sprite only, which is not checked) with no label; and two buttons ('OK' and 'Cancel') labeled 'Click OK.'
              1. Create a new block by either clicking make a block button near the end of the palette, clicking the + sign in the top right corner of the palette (shown below), or right-clicking (or control-clicking on a Mac) in an empty spot in the scripting area and choosing "make a block..." (shown below).
                plus sign atop palette diff --git a/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html b/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html index 598d9a3e88..3b7f150610 100644 --- a/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html +++ b/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html @@ -18,7 +18,7 @@

                Adding Variety to Gossip

              2. If it isn't open already, open your U1L2-Gossip project.
              3. Find more complicated who in the red Lists palette, drag it into the scripting area, and click on it enough times to see how it's different from who.
              4. -
                + Here is the code for more complicated who. There are two new things in it: pick random and if else.
                more complicated who {
     if (pick random (1) to (4)) = (3) {
@@ -144,12 +144,12 @@ <h2>Adding Variety to <code>Gossip</code></h2>
         <div class=: Expressions and Values
                AAP-2.B.3, AAP-2.B.4
                  -
                • An expression is a either a constant value (such as "4" or "winter") or a call to a reporter block with any input slots filled in (such as number, 5 + (4 * 3), or join (who) ( ) (does what) ( ) (who)).
                • +
                • An expression is a either a constant value (such as "4" or "winter") or a call to a reporter block including its inputs (such as number, 5 + (4 * 3), or join (who) ( ) (does what) ( ) (who)).
                • Expressions are evaluated to produce a single value (a value can be a number, a string, a sprite, a costume, a script, a list—anything). For example, 5 + (4 * 3) will be evaluated to 17.
              -
              +
              AAP-3.E.1, AAP-3.E.2
              The expression pick random (1) to (10) would be written as
              RANDOM(1, 10)
              or RANDOM(1, 10). Every time you run this code, you will get a different random number between 1 and 10.
              diff --git a/cur/programming/1-introduction/3-drawing/1-exploring-motion.html b/cur/programming/1-introduction/3-drawing/1-exploring-motion.html index f6a89864b2..21724e92b2 100644 --- a/cur/programming/1-introduction/3-drawing/1-exploring-motion.html +++ b/cur/programming/1-introduction/3-drawing/1-exploring-motion.html @@ -10,13 +10,14 @@

              Exploring Motion

              -

              These are works by artists Josef Albers, Maya Hayuk, Vassily Kandinsky, Atta Kwami, Kazimir Malevich, and Theo van Doesburg. The styles are different, but all of them are based on polygons or circles.

              +

              These are works by artists Josef Albers, Maya Hayuk, Vassily Kandinsky, Atta Kwami, Kazimir Malevich, Alma Thomas, and Theo van Doesburg. The styles are different, but all of them are based on polygons or circles.

              art by Josef Albers art by Maya Hayuk art by Kandinsky art by Atta Kwami art by Malevich + Alma Thomas painting art by van Doesburg

              @@ -25,10 +26,11 @@

              Exploring Motion

              diff --git a/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.html b/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.html index feb9948f3b..475ae30302 100644 --- a/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.html +++ b/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.html @@ -154,10 +154,7 @@

              Debugging with - Alma Thomas painting + Alma Thomas painting
              1. At the right is a painting by Alma Thomas. See what it inspires you to do.
                It's your art. Take liberties. diff --git a/cur/programming/1-introduction/3-drawing/4-modify-your-pinwheel.html b/cur/programming/1-introduction/3-drawing/4-modify-your-pinwheel.html index 90df9d9107..7b818cbd97 100644 --- a/cur/programming/1-introduction/3-drawing/4-modify-your-pinwheel.html +++ b/cur/programming/1-introduction/3-drawing/4-modify-your-pinwheel.html @@ -46,7 +46,7 @@

                Adding Multiple Inputs

              2. Then click the "+" sign at the end again to add an input (choose "Input name"), and call it backup.
              3. diff --git a/cur/programming/1-introduction/3-drawing/6-the-for-block.html b/cur/programming/1-introduction/3-drawing/6-the-for-block.html index c8a066f81b..250caf85a3 100755 --- a/cur/programming/1-introduction/3-drawing/6-the-for-block.html +++ b/cur/programming/1-introduction/3-drawing/6-the-for-block.html @@ -84,16 +84,10 @@

                Looping with a Counter

            • "U1L3-Squiral"Save your work as U1L3-Squiral
            • -

          -
          - -
          -
            -
          1. +
          2. Open your U1L3-Pinwheel project, and build a nest squares block that uses for and your polygon block to draw nested squares. Give it an input so that it will draw whatever number of squares you specify, with each square larger than the previous:
            nested squares
          3. -
          diff --git a/cur/programming/1-introduction/3-drawing/7-programming-journal.html b/cur/programming/1-introduction/3-drawing/7-programming-journal.html new file mode 100644 index 0000000000..1dc6bd2950 --- /dev/null +++ b/cur/programming/1-introduction/3-drawing/7-programming-journal.html @@ -0,0 +1,51 @@ + + + + + + + + + Unit 1 Lab 3: Modern Art with Polygons, Page 7 + + + +

          Keeping a Programming Journal

          +
          On this page, you will learn how keeping a programming journal can help your programming.
          + +
          + Write In Your Journal + Every day in your journal, keep notes like the following: +
            +
          • Any concept about programming that you had trouble understanding.
          • +
          • Questions that you want to remember to ask.
          • +
          • Ideas for projects that you want to work on or improvements to an existing project that you want to make.
          • +
          • + Problems with your code: +
              +
            • What was the symptom?
            • +
            • What did the cause turn out to be?
            • +
            • What change did you make to fix the problem?
            • +
            • What techniques did you use to investigate the problem?
            • +
            +
          • +
          • + How did you organize your code? +
              +
            • Did you define new procedures? +
                +
              • Do they take inputs? If so, what type of inputs do they require? (That is, what is their domain?)
              • +
              • Do they take report a value? If so, what type of value do they report? (That is, what is their range?)
              • +
              +
            • +
            • Could you have defined a procedure somewhere instead of copying and pasting code?
            • +
            +
          • +
          • When appropriate, you might want to include pictures of the stage or of important scripts in your code.
          • +
          +
          + +

          You don't need to copy things out of the curriculum into your journal; you can always look those up in the index.
          The journal is for you, not for your teacher. You won't be graded on what you do or don't put in it. The journal isn't graded because it's a record of the things only you experience in the class, not a record of the ideas in the curriculum. Everyone's journal will be different.

          + + + diff --git a/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html b/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html index 3d57a95f41..5be54d81e8 100644 --- a/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html +++ b/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html @@ -40,19 +40,30 @@

          Your Image in the Cloud

          One reason you are asked to choose a username when you get a Snap! account is to give you the freedom to express political or personal issues without tying those conversations to your actual identity.

          -
          Brian, look up CA law. -bh
          -
          - When you see this symbol in a yellow box:
          - Read More
          - it means that what's in the box isn't something you have to read right now - to be able to complete the lab, or to pass the AP exam, but it's something - we think might be interesting to you. Click the link to see the text. Don't confuse that symbol with - this other one:
          - Write In Your Journal
          - which means we want you to write something in your journal. -
          +
          Brian, look up CA law. -bh
          +
          +

          Brian, I cut the following because that symbol appears very rarely in the curriculum, and it was a lot of reading for something we hardly use. Instead, I just used the word next to the icon in the displayed yellow box below. All students need to know is that yellow is optional. --MF, 8/19/21

          +
          + When you see this symbol in a yellow box:
          + Read More
          + it means that what's in the box isn't something you have to read right now + to be able to complete the lab, or to pass the AP exam, but it's something + we think might be interesting to you. Click the link to see the text. Don't confuse that symbol with + this other one:
          + Write In Your Journal
          + which means we want you to write something in your journal. +
          + The point of this yellow box is to distinguish a yellow box for + good students (these ones) from a yellow box for + struggling students (hints). The reason it's not widely + used in the curriculum is that I've barely begun the process of + adding this symbol everywhere it belongs. -bh +

          I think that's a problematic distinction. Who decides who a "good" student is? Kids get labeled as "good student" or "bad student" and then are treated differently for it and take it on as an identity rather than everyone treating it for all it really can be: someone's observation of how well they have been studying lately. And any student can benefit from a hint from time to time. We should discuss this in a meeting sometime. I might not mind what you are trying to do here, but I do mind that characterization. --MF, 8/20/21

          + + +
          - Read More + Read More What laws exist to protect PII?

          United States law says that websites must have a privacy policy that spells out what the site will do with the information you give them. This is a pretty weak protection; the privacy policies are typically really long, and written in ways that make it hard to find out what information is collected and what is done with it. In Europe, there is now a General Data Protection Regulation (GDPR) that defines what counts as PII, and limits what websites can do without your affirmative permission—a definite "yes" from you, not just not saying "no"—regardless of what they put in their privacy policies. These regulations also state that the website cannot deny you otherwise free services because you refused to permit the use they want you to agree to.

          diff --git a/cur/programming/1-introduction/5-follow-the-leader/1-following-sprites.html b/cur/programming/1-introduction/5-follow-the-leader/1-following-sprites.html index 307a5101da..e2ed7faaaf 100644 --- a/cur/programming/1-introduction/5-follow-the-leader/1-following-sprites.html +++ b/cur/programming/1-introduction/5-follow-the-leader/1-following-sprites.html @@ -32,12 +32,12 @@

          Creating a New Snap! Project

          If you already have Snap! open and there is a project open, follow these steps first:
          1. If necessary, save your open work in Snap!.
          2. -
          3. Choose "New" from the Snap! File menu, File button.
          4. +
          5. Choose "New" from the Snap! File menu, File menu button.
          6. Click "Yes" to open a new project (and close the open one).
          -
        1. Choose "Save As..." from the Snap! File menu, File button.
        2. +
        3. Choose "Save As..." from the Snap! File menu, File menu button.
        4. Type the project name.
        5. Click the "Save" button.
        diff --git a/cur/programming/1-introduction/optional-projects/1-sprite-line-art.html b/cur/programming/1-introduction/optional-projects/1-sprite-line-art.html index 5c6266b041..5088252456 100644 --- a/cur/programming/1-introduction/optional-projects/1-sprite-line-art.html +++ b/cur/programming/1-introduction/optional-projects/1-sprite-line-art.html @@ -26,9 +26,9 @@

        Line Art Toy

      3. Write code that will clear the drawings when space key pressed by the user.
      4. -
      5. The user will use the arrow keys to draw. You'll need a script for each key, starting with a when key pressed block:
        - - when space key pressed
        +
      6. + The user will use the arrow keys to draw. You'll need a script for each key, starting with a when key pressed block:
        + when space key pressed
        For each of the four arrow keys, make the sprite point in the direction of the arrow and then move forward 10 steps.
      diff --git a/cur/programming/2-complexity/1-variables-games/1-number-guessing-game.html b/cur/programming/2-complexity/1-variables-games/1-number-guessing-game.html index 659b8f8e10..cdd47887ed 100755 --- a/cur/programming/2-complexity/1-variables-games/1-number-guessing-game.html +++ b/cur/programming/2-complexity/1-variables-games/1-number-guessing-game.html @@ -109,7 +109,8 @@

      Making a Script Variable

      - What value will this code display?
      +
      Examples like this one are useful to test your understanding of assignment to variables, but you wouldn't use a sequence of assignments like this in an actual program.
      + What value will this code display?
      a ← 3
       b ← a
       a ← 4
      @@ -143,6 +144,8 @@ 

      Making a Script Variable

      + +
    4. diff --git a/cur/programming/2-complexity/1-variables-games/2-checking-player-guess.html b/cur/programming/2-complexity/1-variables-games/2-checking-player-guess.html index 5c251b468e..7fc7b9a214 100755 --- a/cur/programming/2-complexity/1-variables-games/2-checking-player-guess.html +++ b/cur/programming/2-complexity/1-variables-games/2-checking-player-guess.html @@ -11,7 +11,7 @@

      Checking the Player's Guess

      On this page, you'll continue to develop your number guessing game to accept player guesses until the player guesses correctly.

      -
      +

      You'll want the computer to ask players to guess again and again until they guess correctly. To do that, you will use the repeat until block. Repeat until is a loop (just like repeat, forever, and for) but also a conditional (like if and if else). It repeats until a certain condition is met. For this program, the code should repeat until the player's answer equals the secret number.

      @@ -112,9 +112,9 @@

      Checking the Player's Guess

      1. -
        -
        +
        +
        +
        We really shouldn't be encouraging students to mutate a block's inputs. There are really two issues here; one is with the x=x+1 style of programming altogether, and the second is that formal parameters specifically shouldn't generally be mutated; it's better to make a script variable that's initialized to the input value. (If we change this, we need to update the Guided Notes.) --MF, 6/26/21 with BH
        mystery function (input):
 if (input < 5) (repeat until (input = 5) 
 (
@@ -158,9 +158,10 @@ <h2>Checking the Player's Guess</h2>
                             <div class=
        +
      2. +
      3. -
        +
        mystery function (input):
 if (input < 5) (repeat until (input = 5) 
@@ -214,9 +215,10 @@ <h2>Checking the Player's Guess</h2>
                             <div class=
        +
      4. +
      5. -
        +
        mystery function (input):
 if (input < 5) (repeat until (input = 5) 
@@ -268,9 +270,9 @@ <h2>Checking the Player's Guess</h2>
 
         
         <div class= -
          +
          1. When the computer congratulates the player for guessing correctly, have the computer say the number. For example, it might say, "You guessed it! My secret number was 7."
          2. -
            +
            Use join to merge the text "You guessed it! My secret number was" with the value of the secret number variable.
        diff --git a/cur/programming/2-complexity/1-variables-games/3-debugging-extending.html b/cur/programming/2-complexity/1-variables-games/3-debugging-extending.html index 7c80a2eb75..2e4f798868 100644 --- a/cur/programming/2-complexity/1-variables-games/3-debugging-extending.html +++ b/cur/programming/2-complexity/1-variables-games/3-debugging-extending.html @@ -20,7 +20,7 @@

        Debugging and Extending Your Number Guessing Game

        1. Click here to load this file. Then save it to your Snap! account. In the file is a definition of a number guessing game block. It has a bug—an error in the code that makes the program behave differently than expected. This code, if you keep playing over and over, will mostly work, but sometimes (not often) it will congratulate you before you even guess. -

          Talk with Another Pair Analyze the code, explain how this can happen, and fix the bug.

          +

          Talk with Another Pair Analyze the code, explain how this can happen, fix the bug, and save the project.

        2. Have it pick its random number just from 1 to 3 to make the bug occur more often.

          diff --git a/cur/programming/2-complexity/1-variables-games/5-choosing-avatar.html b/cur/programming/2-complexity/1-variables-games/5-choosing-avatar.html index f5b5a39ae6..b3fc44a69f 100644 --- a/cur/programming/2-complexity/1-variables-games/5-choosing-avatar.html +++ b/cur/programming/2-complexity/1-variables-games/5-choosing-avatar.html @@ -24,7 +24,7 @@

          Choosing a Costume

        3. Remove the code in the program that changes the costume when you click the sprite.
      6. -
      7. Try using switch to costume [] with different inputs to switch the sprite's costume manually a few times.
      8. +
      9. Experiment with the switch to costume [] block using different inputs to switch the sprite's costume manually a few times.
      @@ -65,7 +65,8 @@

      Choosing a Costume

      You can drag blocks into the input slot of switch to costume even though it's a drop-down menu.
      - switch to costume []switch to costume (item (1) of 'list input slot') + switch to costume [] + switch to costume (item (1) of 'list input slot')

    5. diff --git a/cur/programming/2-complexity/1-variables-games/6-keeping-a-journal.html b/cur/programming/2-complexity/1-variables-games/6-keeping-a-journal.html new file mode 100644 index 0000000000..937cada621 --- /dev/null +++ b/cur/programming/2-complexity/1-variables-games/6-keeping-a-journal.html @@ -0,0 +1,60 @@ + + + + + + Unit 2 Lab 1: Games, Page 6 + + + +

      Keeping a Programming Journal

      +
      On this page, you will begin using a journal to keep track of your programming insights.
      +

      + You can use a journal to learn from your own programming. + The journal is just a notebook in which you write notes to yourself, + like a diary. It's for you, not for your teacher. +

      + +

      + Here are some ways to use your journal: +

        +
      • + When you learn a new idea (not just the + name of a Snap! block), make a note of it. +
      • +
      • When you make or discover a beautiful program—a beautiful piece of code, or one that draws a beautiful picture—print it out, or take a photo, and add it to your journal.
      • +
      • + When you find a bug in your program, write down: +
          +
        1. The symptom—How did you know there was a bug?
        2. +
        3. How you found the underlying problem—What steps did you take to find figure out what was going on?
        4. +
        5. The underlying problem—What was going on?
        6. +
        7. How you fixed it—Record anything that might be helpful next time you encounter a bug like this, or to help you avoid having a bug like this in the future.
        8. +
        +
      • +
      • When something inspires you to create a related program on your own, write down your idea for later.
      • +
      • +
        This is just like recording bugs except that it’s a bug in your understanding rather than a bug in your code.
        + When you're asked to predict what some script will do, and your expectations turn out to be wrong, write down: +
          +
        1. What you thought would happen
        2. +
        3. What actually happened
        4. +
        5. Why you thought what you thought
        6. +
        7. How you think about it now
        8. +
        +
      • +
      • + When the curriculum asks you to write + your ideas about something, write in your journal. +
      • +
      +

      + +
      +
        +
      1. Write In Your Journal Are there any bugs you've run into so far? Any cool project ideas? Any projects you've been proud of?
      2. +
      +
      + + + diff --git a/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html b/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html index c7418a690a..247242361a 100644 --- a/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html +++ b/cur/programming/2-complexity/2-data-structures-art/2-quizzes.html @@ -11,7 +11,6 @@

      Planning a Quiz App

      -
      Need to decide whether/where to integrate pause all stuff lost with optionalization of mandala design and also to update debugging page. --MF, 7/5/19

      On this page, you will begin to develop a quiz app by creating an abstract data type to pair the questions with their answers.

      @@ -25,7 +24,8 @@

      Planning a Quiz App

      : Sublist -

      A sublist is a list as an item of another list.

      +

      A sublist is a list used as an item of another list.

      +

      (The word sublist is also used to refer to some subset of a list.)

      You'll use a list to store your quiz items in a global variable and use a sublist for each question/answer pair. Then you can choose just one pair at a time to work with. set (computer science quiz) to (list (list (What is the computer science term for looping or repetition?) (iteration)) (list (What is the name for the abstraction in a program that can hold a value?) (variable)) (list (What kind of variable is available only in the part of the program where it is defined?) (local variable))) @@ -115,7 +115,7 @@

      Specifying an Input Type

    6. Test both the selectors for different items in your list of quiz items, and debug any problems.
    7. -
      +

      Imagine you make a variable capitals and use set to give this list of lists a name:
      @@ -151,7 +151,7 @@

      Specifying an Input Type

      - length of (capitals) reports the number 8. + (length) of (capitals) reports the number 8.
      +
      +
      + item (3) of (capitals) reports the string "Boise". +
      + +
      +
      +
      + item (last) of (all but first of (capitals)) reports the string "Iowa". +
      + +
      +
      +
      + (length) of (item (1) of (capitals)) reports the number 2. +
      + +
      +
    8. diff --git a/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.html b/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.html index 0490ae19b5..c5f643b4c7 100644 --- a/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.html +++ b/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.html @@ -257,7 +257,7 @@

      Checking Each Quiz Answer

      Before telling the user the right answer, give them three tries to get it right.
    9. - Users might give answers that are close enough but not exactly the answer you expected. For example, someone might answer "What kind of variable is available only in the part of the program where it is defined?" with "a local variable," "local variable," or just "local," or the same possibilities for "script variable." So your question answer ADT could take a list of keywords in the second slot and accept any answer that includes any of the keywords (so in this case, the list would be {local, script} and would accept "a local one"). Use () contains () to adapt your code. + Users might give answers that are close enough but not exactly the answer you expected. For example, someone might answer "What kind of variable is available only in the part of the program where it is defined?" with "a local variable," "local variable," or just "local," or the same possibilities for "script variable." So your question answer ADT could take a list of keywords in the second slot and accept any answer that includes any of the keywords (so in this case, the list would be {local, script} and would accept "a local one"). Use 'list input slot' contains () to adapt your code.
    diff --git a/cur/programming/2-complexity/3-predicates/1-what-is-predicate.html b/cur/programming/2-complexity/3-predicates/1-what-is-predicate.html index cfea4f35cf..87349deed7 100644 --- a/cur/programming/2-complexity/3-predicates/1-what-is-predicate.html +++ b/cur/programming/2-complexity/3-predicates/1-what-is-predicate.html @@ -97,10 +97,10 @@

    What's a Predicate?

  • -
    : Selection +
    : Sequencing, Selection, Iteration
    Selection: AAP-2.G.1; sequencing, selection, iteration: AAP-2.A.4

    Selection means deciding (selecting) which part of an algorithm to run based on whether a condition is true or false.

    -

    Every algorithm can be constructed using sequencing (following steps in order), selection (deciding), and iteration (repeating).

    +

    Every algorithm can be constructed using sequencing (following steps in order), selection (deciding), and iteration (repeating).

    diff --git a/cur/programming/2-complexity/3-predicates/2-combining-predicates.html b/cur/programming/2-complexity/3-predicates/2-combining-predicates.html index 763ec00be5..254dc2c85f 100644 --- a/cur/programming/2-complexity/3-predicates/2-combining-predicates.html +++ b/cur/programming/2-complexity/3-predicates/2-combining-predicates.html @@ -91,6 +91,7 @@

    Making a Predicate

  • +
    AAP-2.E part b
    diff --git a/cur/programming/2-complexity/3-predicates/3-combining-conditionals.html b/cur/programming/2-complexity/3-predicates/3-combining-conditionals.html index 6438530eca..0e7ffc933f 100644 --- a/cur/programming/2-complexity/3-predicates/3-combining-conditionals.html +++ b/cur/programming/2-complexity/3-predicates/3-combining-conditionals.html @@ -16,7 +16,7 @@

    Combining Conditionals

    1. -
      AAP-2.L, AAP-2.L.1, AAP-2.L.3, AAP-2.L.4, AAP-2.L.5
      +
      AAP-2.E part b, AAP-2.L, AAP-2.L.1, AAP-2.L.3, AAP-2.L.4, AAP-2.L.5
      Talk with Your Partner Here are four possible ways to define . Discuss what advantages each style has:
        @@ -35,11 +35,11 @@

        Combining Conditionals

    -

    Look back at the first two examples in the previous problem. Since the predicate expression a = b will report true when they are equal and false otherwise, it's unnecessary to use the nested conditional statement in the first example, and the second example using the predicate inside the else part is sufficient. Sometimes, however (especially when you aren't building a predicate), it can be helpful to use nested conditional statements.

    -
    -
    AAP-2.I.1, AAP-2.I.2
    -

    A nested conditional statement is an if or if else statement inside the else part of another if else statement. If the predicate of the outer if else statement is false, then inner (nested) conditional statement will test its predicate and decide what to do.

    +
    +
    AAP-2.I.1
    +

    A nested conditional statement is an if or if else statement inside another if else statement.

    +

    Look back at the first two examples in the previous problem. Since the predicate expression a = b will report true when they are equal and false otherwise, it's unnecessary to use the nested conditional statement in the first example, and the second example using the predicate inside the else part is sufficient. Sometimes, however (especially when you aren't building a predicate), it can be helpful to use nested conditional statements.

    1. diff --git a/cur/programming/2-complexity/3-predicates/4-boolean-experiments.html b/cur/programming/2-complexity/3-predicates/4-boolean-experiments.html index 52f4ae6c77..6461abd7c6 100644 --- a/cur/programming/2-complexity/3-predicates/4-boolean-experiments.html +++ b/cur/programming/2-complexity/3-predicates/4-boolean-experiments.html @@ -48,7 +48,7 @@

      Boolean Expression Experiments

      Discuss why the expression (x position > 0) and (distance to apple > 100) generates this picture:
      There's an apple in the center. The entire left half of the stage is orange; so is a circle around the apple. What's left is purple.
    2. -
      AAP-2.F part b, AAP.-2.C
      +
      AAP-2.E part b, AAP.-2.C
    3. Match the Boolean expressions with the pictures. There are more expressions than pictures.
      diff --git a/cur/programming/2-complexity/3-predicates/5-keeping-list-items.html b/cur/programming/2-complexity/3-predicates/5-keeping-list-items.html index 5a6bf9674c..f0c7d1453c 100644 --- a/cur/programming/2-complexity/3-predicates/5-keeping-list-items.html +++ b/cur/programming/2-complexity/3-predicates/5-keeping-list-items.html @@ -15,7 +15,7 @@

      Keeping Items from a List

      On this page, you will use predicates with the keep block to keep items in a list that have specific characteristics.

      -

      As you know, predicates can be used with conditionals to decide when to do something; they can also be used with keep to decide which things to keep. The keep items 'predicate input slot' from 'list input slot' block takes a list and a predicate as input, and it reports a new list keeping only the items from the input list that make the condition described by the predicate true.

      +

      As you know, predicates can be used with conditionals to decide when to do something; they can also be used with keep to decide which things to keep. The keep items 'predicate input slot' from 'list input slot' block takes a list and a predicate as input, and it reports a new list keeping only the items from the input list that make the condition described by the predicate true.

      For example, the following expression will find words from the words list whose first letter is v. The blank input slot is where each item of the list goes to decide if it will be kept.
      diff --git a/cur/programming/2-complexity/4-making-computers-do-math/2-math-predicates.html b/cur/programming/2-complexity/4-making-computers-do-math/2-math-predicates.html index 86bd1b755a..2371e3453e 100644 --- a/cur/programming/2-complexity/4-making-computers-do-math/2-math-predicates.html +++ b/cur/programming/2-complexity/4-making-computers-do-math/2-math-predicates.html @@ -110,7 +110,7 @@

      Debugging Dependencie Hints about building the divisors block
        -
      • You could build this with for or for each, but it will require less code to build it with keep items () from (). (You learned about keep on Unit 2 Lab 3 Page 5: Keeping Items from a List.)
      • +
      • You could build this with for or for each, but it will require less code to build it with keep items 'predicate input slot' from 'list input slot'. (You learned about keep on Unit 2 Lab 3 Page 5: Keeping Items from a List.)
      • You could build this with mod, but you already built () divisible by () ? (using mod), so divisible by? will be simpler to use.
      • The numbers from () to () block may be helpful.
      diff --git a/cur/programming/2-complexity/4-making-computers-do-math/3-other-math-reporters.html b/cur/programming/2-complexity/4-making-computers-do-math/3-other-math-reporters.html index b1155c379f..4f89d913e8 100644 --- a/cur/programming/2-complexity/4-making-computers-do-math/3-other-math-reporters.html +++ b/cur/programming/2-complexity/4-making-computers-do-math/3-other-math-reporters.html @@ -24,7 +24,7 @@

      More Mathematical Reporters

    -

    The combine 'list input slot' using 'reporter input slot' block takes two inputs: a list and an operation with two inputs, and it reports the result of combining all the elements in the input list using the input operation. For example, the expression below reports: 0 + 1 + 2.
    +

    The combine 'list input slot' using 'reporter input slot' block takes two inputs: a list and an operation with two inputs, and it reports the result of combining all the elements in the input list using the input operation. For example, the expression below reports: 0 + 1 + 2.
    combine (list {0, 1, 2}) with (()+()) reporting 3

    @@ -208,7 +208,7 @@

    More Mathematical Reporters

    Hint about building greatest common divisor
    You may find it useful to use maximum of list as well as divisors and also to build an intersection block that takes two lists as input and reports all of the items that are on both lists.
    - intersection of {apples, potatoes, carrots, pears} and {acorns, apples, pears, pinecones} reporting {apples, pears}
    + intersection of {apples, potatoes, carrots, pears} and {acorns, apples, pears, pine cones} reporting {apples, pears}
    More detailed hints about greatest common divisor
    In order to find the greatest common divisor of two numbers you will need to find: diff --git a/cur/programming/2-complexity/5-copyrights/1-copyright.html b/cur/programming/2-complexity/5-copyrights/1-copyright.html index 67adb44e83..9caac087f6 100644 --- a/cur/programming/2-complexity/5-copyrights/1-copyright.html +++ b/cur/programming/2-complexity/5-copyrights/1-copyright.html @@ -34,7 +34,7 @@

    Copyright

  • Talk with Another Pair
  • If your class is like most classes, the first set of questions got very different responses from the second set. Discuss in small groups: Is it "stealing" to download artistic works without permission? Why or why not?
  • -
  • Discuss in small groups: Suppose anyone were allowed to download any music, movies, etc., they want. How would the artists (musicians, writers, producers, actors, and so on) support themselves?
  • +
  • Discuss in small groups: Suppose anyone were allowed to download any music, movies, etc., they want. How could the artists (musicians, writers, producers, actors, and so on) support themselves?
  • IOC-1.F.1
    The copyright law makes it illegal for anyone to make copies of someone else's work (a book, a painting, a song, etc.) without the permission of the author. There are exceptions, as you'll learn later in this lab. diff --git a/cur/programming/2-complexity/5-copyrights/2-fairuse.html b/cur/programming/2-complexity/5-copyrights/2-fairuse.html index 05271aee90..71506b0e30 100644 --- a/cur/programming/2-complexity/5-copyrights/2-fairuse.html +++ b/cur/programming/2-complexity/5-copyrights/2-fairuse.html @@ -45,17 +45,39 @@

    Fair Use

    IOC-1.F.5
      -
    • Creative Commons is a specific copyright license that allows others to use, share, and revise your work.
    • +
    • Creative Commons is a specific family of copyright licenses that allow others to use, share, maybe sell, and maybe revise your work.
    -
    Look at the very bottom of this page. This curriculum is under a CC-BY-NC-SA license, which is a Creative Commons (CC) license meaning that anyone can use and publish the curriculum or a modification of it, provided that they credit the authors (BY The University of California, Berkeley, and Education Development Center, Inc.), they use it not for profit (NC, non-commercially), and they license any modified version under the same terms (SA, share-alike). Because of the NC part, this is not technically a "free license," which would allow use for any purpose (including for-profit). People argue over whether it's ethically necessary to allow that much freedom of use.
    +
    Look at the very bottom of this page. This curriculum is under a CC-BY-NC-SA license, which is a Creative Commons (CC) license meaning that anyone can use and publish the curriculum or a modification of it, provided that they credit the authors (BY The University of California, Berkeley, and Education Development Center, Inc.), they use it not for profit (NC, non-commercially), and they license any modified version under the same terms (SA, share-alike). Because of the NC part, this is not technically a "free license," which would allow use for any purpose (including for profit). People argue over whether it's ethically necessary to allow that much freedom of use.
    IOC-1.F.5

    Ideas similar to Creative Commons are used for particular kinds of material:

      -
    • Free software means software that anyone can copy, use, modify, and redistribute.
    • -
    • Open source software is a more general term that means that you put the program's code online. You may still restrict how people can use the program.
    • +
    • Free software means software that anyone can copy, use, modify, and redistribute, including commercially, provided that any modifications must be under the same license.
    • +
      + Read More + Doesn't the “provided that” make it unfree? +
      + The reason for that restriction is to prevent other people from + turning a modified version of the software into non-free software + with restrictive licensing. That's the only thing you're not + allowed to do: make it unfree. +
      +
      +
    • Open source software is a more general term that means that you make the program's source (human-readable) code available to anyone. You may still restrict how people can use the program.
    • +
      + Read More + What's the point of making it available if people aren't allowed to use it? +
      + One reason is for security software, so that people can check that + the software isn't leaking your password or other data, and will + therefore trust you. (One reason many people don't trust + computerized voting machines is that their manufacturers + keep their code secret.) Another reason for open source is that you're hoping other + people will contribute improvements to your proprietary software. +
      +
    • Open access scholarly research reports are available for free download, rather than requiring the permission of a journal publisher.

    diff --git a/cur/programming/3-lists/1-abstraction/5-building-tic-tac-toe.html b/cur/programming/3-lists/1-abstraction/5-building-tic-tac-toe.html index 4274f590ab..e82995faf0 100644 --- a/cur/programming/3-lists/1-abstraction/5-building-tic-tac-toe.html +++ b/cur/programming/3-lists/1-abstraction/5-building-tic-tac-toe.html @@ -58,7 +58,7 @@

    Building a Tic-Tac-Toe Board

    • Notice that the parent sprite (not the clone) moves to the new random position after cloning itself. Look back at the code; why does this make sense?
    • -
    • Note that both the clones and the parent are sprites. Both are clickable (try it) and draggable (try that too). This is different from the effects of the stamp Pen block, which just leaves a picture of the sprite on the stage.
    • +
    • Note that both the clones and the parent are sprites. Both are clickable (try it) and draggable (try that too). This is different from the effect of the stamp Pen block, which just leaves a picture of the sprite on the stage.
    • The create a clone block takes an input because it can copy any sprite. In this project, there's only one sprite at the beginning, so your choices are either myself or Square (the sprite's name), which in this case, means the same thing.
    diff --git a/cur/programming/3-lists/1-abstraction/6-debugging-recap.html b/cur/programming/3-lists/1-abstraction/6-debugging-recap.html index 28a8f94506..8851cae0fe 100644 --- a/cur/programming/3-lists/1-abstraction/6-debugging-recap.html +++ b/cur/programming/3-lists/1-abstraction/6-debugging-recap.html @@ -1,23 +1,16 @@ - + - - + + - - Unit 3 Lab 1: Dealing with Complexity, Page 6 - + + Unit 3 Lab 1: Dealing with Complexity, Page 6 + -

    Debugging Recap

    -
    Brian and Mary need to wordsmith the first set of bullets (second set done). --MF, 12/16/18
    -
    -

    PG: This is a discussion page, a recap. Summary's useful but "pick one and discuss" feels lame and empty to students, just make-work. Can we fix that?

    -

    BH: This is okay. I'm not sure it's necessary.

    -

    MF: It's a lot to look at. I had tried to break it up into chunks, but BH nixed that. Painful to look at as is…

    -
    - +

    Debugging Recap

    On this page, you will review what you've learned about debugging in Snap!.

    @@ -32,43 +25,36 @@

    Debugging Recap

    Tips

    -

    -

      -
    • Don't delete your project and start over. This sounds obvious when you see it written down, but programming students sometimes get angry at their bugs. Remember that if you have a program with 20 blocks in it, and one of the 20 has an error, then your program is 95% correct.
    • -
    • Don't be hard on yourself. Everyone gets bugs in their programs; it's part of programming.
    • -
    • Don't add code to work around the bug. Don't edit the code at all (except to add temporary debugging code) until you understand why it's not doing what you intended, then remove the error. Think: "Debug by subtraction, not by addition."
    • -
    • Try to write beautiful code. If you're writing a quiz program to help someone learn the state capitals, then yes, in some way or another you're going to have 50 separate state-to-city connections in your project. But if you're writing a quiz program to help someone learn the multiplication tables, and you have 100 if blocks in your program, then you aren't taking advantage of the natural structure of the problem. The computer can figure out arithmetic answers for you. In general, a good rule of thumb is that if you can't see an entire script on your screen at once, it's time to stop and organize your code better.
    • -
    • How to find a bug: -
        -
      • Reproduce the problem so you are sure you know how to recreate it. This will help you know when you've fixed it.
      • -
      • Isolate the piece of code producing the error. Test pieces of your code separately so you know what's working and what isn't.
      • -
      • Identify the specific cause of the error within that code. Why is that code doing the wrong thing?
      • -
      • Always test your code with different inputs. Look for extreme cases: What if the input is really big, zero, negative, or a decimal? What if the user types something you aren't expecting? What if the user clicks somewhere else?
      • -
    • -
    • - Love your bugs! They pose an interesting puzzle. Sometimes their incorrect behavior suggests another project:
      +

      +

        +
      • Try to write elegant code. If you're writing a state capitals quiz, then you'll need to store every state and capital in your program, but if you're writing a multiplication quiz you can have the computer calculate the answers. Take advantage of the natural structure of the problem you are solving.
      • +
      • AAP-2.B.7
        Use abstraction to hide complexity. Isolate some details into an custom block, and get that working right. Then use that abstraction just as if it were built into Snap!. Abstraction allows you to build and test pieces of your code one at a time; it makes your code more readable. If you can't see an entire script on your screen at once, it's time to stop and organize your code.
      • +
      • Don't delete your project and start over. This sounds obvious when you see it written down, but programming students sometimes get angry at their bugs. Remember that if you have a program with 20 blocks in it, and one of the 20 has an error, then your program is 95% correct.
      • +
      • + How to find a bug: +
          +
        • Reproduce the problem so you are sure you know how to recreate it. This will help you know when you've fixed it.
        • +
        • Isolate the piece of code producing the error. Test pieces of your code separately so you know what's working and what isn't.
        • +
        • Identify the specific cause of the error within that code. Why is that code doing the wrong thing?
        • +
        • Always test your code with different inputs. Look for extreme cases: What if the input is really big, zero, negative, or a decimal? What if the user types something you aren't expecting? What if the user clicks somewhere else?
        • +
        +
      • +
      • Don't add code to work around a bug. In fact, don't edit buggy code at all (except to add temporary debugging code) until you understand the problem; then remove the error. Think: "Debug by subtraction, not by addition."
      • +
      • Don't be hard on yourself. Everyone gets bugs in their programs; it's part of programming.
      • +
      • If it works, it's correct. You don't need to ask your teacher "Is this right?" The computer will tell you whether your solution is correct, and more than one solution may work.
      • +
      • Be open to new ideas. Especially if you learned to program before this course, a few of the ideas in this course might seem strange to you, such as the use of higher order functions instead of looping. One of the goals of BJC is to introduce you to different ways of organizing a program that make the code shorter and don't have as many openings for bugs to creep in.
      • +
      • + Love your bugs! They pose an interesting puzzle. Sometimes their incorrect behavior suggests another project:
        buggy triangle turns into star by repetition -
      • -
      • Keep the following two opposite ideas in mind at once: -
          -
        • If it works, it's correct. One of the school rituals hated by both students and teachers is everyone tugging on the teacher's sleeve saying "Is this right?" One of the joys of programming is that the computer itself will tell you whether your solution is correct. But also...
        • -
        • Be open to new ideas. This is especially important if you've programmed before. If you automatically write - for i = 1 to (length of (input list))
          - before you've even read the problem statement, then one of our goals in this course is to introduce you to different ways of organizing a program, such as higher order functions, that make the code shorter and don't have as many openings for bugs to creep in. -
        • -
        -
      • -
        AAP-2.B.7
        -
      • - Use abstraction to hide the complexity of code. Abstraction is a way of thinking; you tuck some details into one part of your code and get them working right, and then use that chunk confidently, just as if it were built into Snap!. Some examples of using abstraction include creating custom blocks and using abstract data types. These kinds of abstraction allow you to build and test pieces of your code one at a time, so bugs are automatically isolated. Abstraction makes your code readable. -
      • -
      -

      +
    • +
    +

    Talk with Your Partner
      -
    1. Which of these tips would have helped you address an issue in debugging? Pick one and discuss your experience with your partner.
    2. +
    3. Which of these tips would have helped you debug one of your projects? Pick one and discuss your experience with your partner.
    4. +
    5. Choose one of these tips that doesn't make sense to you, and try to figure out why we included it.
    @@ -78,16 +64,12 @@

    Snap! Debugging and Organizing Tools

  • diff --git a/cur/programming/3-lists/1-abstraction/old/1-abstraction-brick-wall.html b/cur/programming/3-lists/1-abstraction/old/1-abstraction-brick-wall.html index b1a9c57f37..cd8f7bd472 100755 --- a/cur/programming/3-lists/1-abstraction/old/1-abstraction-brick-wall.html +++ b/cur/programming/3-lists/1-abstraction/old/1-abstraction-brick-wall.html @@ -35,7 +35,7 @@

    Drawing One Brick

  • Try out this block.
    - If your "brick" has rounded ends, remember that you can change how lines are drawn by clicking the settings button (settings button) in the toolbar, and turning on "Flat line ends." Rounded ends stick out beyond the length you specified. Here's a picture of the rounded brick with a regular line (pen size 1) of the same length inside it: + If your "brick" has rounded ends, remember that you can change how lines are drawn by clicking the settings button (Settings menu button) in the toolbar, and turning on "Flat line ends." Rounded ends stick out beyond the length you specified. Here's a picture of the rounded brick with a regular line (pen size 1) of the same length inside it: Round brick

    Rounded ends are better for most line drawings, but not for drawing bricks.

    diff --git a/cur/programming/3-lists/2-contact-list/2-adding-contact.html b/cur/programming/3-lists/2-contact-list/2-adding-contact.html index 3bbd7c21e0..d3bae16fb7 100644 --- a/cur/programming/3-lists/2-contact-list/2-adding-contact.html +++ b/cur/programming/3-lists/2-contact-list/2-adding-contact.html @@ -123,6 +123,10 @@

    Collecting Data from the User

    So you need to be able to show a name first name first for ordinary display, but last name first for sorting.

    +

    + Before you begin, save your project again, under the name U3L2-TIF. This will keep your work on these problems separate from the regular problems. +

    +
    1. The first step is to create an abstract data type for names. You'll need a constructor that takes first name and last name as inputs, and reports a list of them to represent the name part of a contact.
    2. @@ -130,7 +134,7 @@

      Collecting Data from the User

    3. Writing a name: Your name from contact block will now report a list, as it should. But some other parts of the program, such as the part that displays a contact to the user, want to display the name as a text string: "Betsy Anderson." The part that sorts the contact list also wants a string: "Anderson, Betsy." Write two blocks name, display form, from contact 'list input slot and name, sort form, from contact 'list input slot that join the two parts of the name with a space and/or a comma as needed.
    This three-step process (create an ADT, use it to read values of that type, use it to write values of that type) is very common in programming. You'll follow the same three steps again in the Take It Further on page 4.
    -

    On page 4 you're going to find a contact by letting the user enter any part of the name, and display the entire contact. Use the name abstraction you've just created when you do that.

    +

    Save your work. On page 4 you're going to find a contact by letting the user enter any part of the name, and display the entire contact. Use the name abstraction you've just created when you do that.

    diff --git a/cur/programming/3-lists/2-contact-list/4-looking-up-data.html b/cur/programming/3-lists/2-contact-list/4-looking-up-data.html index c63a9f479a..52ceaa34ff 100644 --- a/cur/programming/3-lists/2-contact-list/4-looking-up-data.html +++ b/cur/programming/3-lists/2-contact-list/4-looking-up-data.html @@ -89,7 +89,7 @@

    Selecting Specific Data

    -

    This set of exercises requires that you've already done the Take It Further exercises on page 2.

    +

    This set of exercises requires that you've already done the Take It Further exercises on page 2. Open your project U3L2-TIF.

    1. Write a predicate function that takes two contacts as inputs. It should return True if the first contact belongs before the second one in a sorted contact list. That is, you'll have to extract the names (in sorted form) from the two contacts, and then use < to compare them. Respect the data abstractions.
    2. diff --git a/cur/programming/3-lists/2-contact-list/5-mapping-over-list.html b/cur/programming/3-lists/2-contact-list/5-mapping-over-list.html index 29e1e89023..085685eca5 100644 --- a/cur/programming/3-lists/2-contact-list/5-mapping-over-list.html +++ b/cur/programming/3-lists/2-contact-list/5-mapping-over-list.html @@ -66,7 +66,7 @@

      Transforming Every List Item

    - The map 'reporter input slot' over 'list input slot' block takes two inputs: a function (a reporter with a blank input slot) and a list, and it reports a new list in which each item is the result of calling the function with an item from the original list as input. For example:
    + The map 'reporter input slot' over 'list input slot' block takes two inputs: a function (a reporter with a blank input slot) and a list, and it reports a new list in which each item is the result of calling the function with an item from the original list as input. For example:
    map (join( )(s)) over (list {cat, dog, bird}) reporting {cats, dogs, birds}
    map (round ( )) over (list{3.14159, 87, 5.4}) reporting {3, 87, 5}

    diff --git a/cur/programming/3-lists/2-contact-list/old/1-contact-list-app.html b/cur/programming/3-lists/2-contact-list/old/1-contact-list-app.html index 35366dda79..c256c4cdd3 100644 --- a/cur/programming/3-lists/2-contact-list/old/1-contact-list-app.html +++ b/cur/programming/3-lists/2-contact-list/old/1-contact-list-app.html @@ -27,7 +27,7 @@

    Contact List App

    Dan had some thoughts on this next section that we implemented but then reverted. Here are the edits that were made and removed:
    • Write a reporter phone number of () that takes any part of a person's name as input, and reports a list of all the phone numbers of the people whose names match. You will need:
    • -
    • (instead of empty) c. map () over (), which performs a function over each item of the list.
    • +
    • (instead of empty) c. map 'reporter input slot' over 'list input slot', which performs a function over each item of the list.
    The problem with these unimplemented edits was that they required more complicated programming than is appropriate for this point in the curriculum. It would, of course, be nice if the program handled the case of multiple search results better than just returning the first one, and that should be addressed at a later point. --Aug 2016 @@ -35,7 +35,7 @@

    Contact List App

    Write a reporter phone number of () that takes any part of a person's name as input, and reports that person's phone number, or "not found" if the name is not in the contact list. You will need:
    1. <string () contains ()>, which lets you find out whether one string (a contact's name in the list) contains another string (a name or part of a name).
    2. -
    3. keep items such that <  > from (list), which filters the list for only the items that make the function true.
    4. +
    5. keep items 'predicate input slot' from 'list input slot', which filters the list for only the items that make the function true.
    6. is 'list input slot' empty?, which returns true if the list is empty and false otherwise.
  • diff --git a/cur/programming/3-lists/2-contact-list/old/2-exploring-list-processing.html b/cur/programming/3-lists/2-contact-list/old/2-exploring-list-processing.html index d322768192..dc9ed695ad 100644 --- a/cur/programming/3-lists/2-contact-list/old/2-exploring-list-processing.html +++ b/cur/programming/3-lists/2-contact-list/old/2-exploring-list-processing.html @@ -29,8 +29,8 @@

    Exploring List Processing

    For each of the following reporters, discuss what you think it does. Then, experiment using the Brazil data list (shown right) and see what happens.
    1. length of {}
    2. -
    3. all but first of {}
    4. -
    5. () in front of {}
    6. +
    7. all but first of 'list input slot'
    8. +
    9. () in front of 'list input slot'
  • @@ -68,7 +68,7 @@

    Exploring List Processing

      -
    1. Figure out two different tests to use withkeep items such that () from () on the listlist(Russia-Haiti-Japan-Brazil-Rwanda-VietNam) so that keep reports {Haiti, Japan}
    2. +
    3. Figure out two different tests to use withkeep items 'predicate input slot' from 'list input slot' on the listlist(Russia-Haiti-Japan-Brazil-Rwanda-VietNam) so that keep reports {Haiti, Japan}
    4. Find a way to use keep with the same list, so that your code reports only the countries from the list with names longer than 7 characters.
    5. diff --git a/cur/programming/3-lists/4-robots-ai/3-implications.html b/cur/programming/3-lists/4-robots-ai/3-implications.html index 8659ad56fa..db66d447ff 100644 --- a/cur/programming/3-lists/4-robots-ai/3-implications.html +++ b/cur/programming/3-lists/4-robots-ai/3-implications.html @@ -31,7 +31,7 @@

      Implications of AI

    6. Teaching robots right from wrong isn't just about AI as weapons.-->
    7. What about a self-driving car that has to make a choice between the life of its passenger and the life of a pedestrian? How does that choice get made?
    8. There's also the issue of who gets the benefits of AI. The people whose jobs are being replaced by robots are disproportionately lower-income. How can we make sure that everyone benefits from developments in AI?
    9. - What laws apply to AI? What happens with a robot commits a crime? Who gets punished? + What laws apply to AI? What happens when a robot commits a crime? Who gets punished?

      Some relevant articles:

        diff --git a/cur/programming/3-lists/old/2-sorting/1-recursion.html b/cur/programming/3-lists/old/2-sorting/1-recursion.html index 3a8ef2dd82..53c94cae16 100644 --- a/cur/programming/3-lists/old/2-sorting/1-recursion.html +++ b/cur/programming/3-lists/old/2-sorting/1-recursion.html @@ -74,8 +74,8 @@

        Recursive Reporters

      • What should your procedure report in that case? Super big hint if you can't get it to work.
        The block is supposed to report a number.
      • - What should your procedure report in the recursive case? You have to find a smaller, similar subproblem just as you did for the triangle fractal. Generally, when writing recursive blocks with lists as input, the most common idea is to split the list into its first item (item 1 of) and all the other items (all but first of). -
        item 1 of and all but first of are the main selectors for lists.
        + What should your procedure report in the recursive case? You have to find a smaller, similar subproblem just as you did for the triangle fractal. Generally, when writing recursive blocks with lists as input, the most common idea is to split the list into its first item (item () of 'list input slot') and all the other items (all but first of 'list input slot'). +
        item () of 'list input slot' and all but first of 'list input slot' are the main selectors for lists.
        1. What are you going to do with all but first of the list? You really don't need this hint.
          What makes this a recursive procedure?
        2. @@ -120,7 +120,7 @@

          Recursive Reporters

        3. Now rewrite it using recursion instead of map. -
          Selectors are all you needed for problem 6 because the reported result wasn't a list. If you want to write a recursive block that reports a list, you also need the constructor () in front of (), which makes a new list with one new item in front of an existing list.
          +
          Selectors are all you needed for problem 6 because the reported result wasn't a list. If you want to write a recursive block that reports a list, you also need the constructor () in front of 'list input slot', which makes a new list with one new item in front of an existing list.
          Remember the steps: What's the base case? What should you report in that case? What should you do with the first list item? What will you do with the rest of the input list? And what combiner do you need to put those together?
        4. Save your work diff --git a/cur/programming/3-lists/old/2-sorting/old/0-old-walk-down.html b/cur/programming/3-lists/old/2-sorting/old/0-old-walk-down.html index 7b792fb99a..9e32e7c55f 100644 --- a/cur/programming/3-lists/old/2-sorting/old/0-old-walk-down.html +++ b/cur/programming/3-lists/old/2-sorting/old/0-old-walk-down.html @@ -16,8 +16,7 @@

          Walking Down a List

          In this lab you will sort your contact list alphabetically by name.
          On this page you will use recursion to examine the items of a list one by one.
          -

          You've already used the block to look at a single item from a list. Here you'll useall but first of ( ) to deal with the rest of the list.

          +

          You've already used theitem () of 'list input slot' block to look at a single item from a list. Here you'll useall but first of 'list input slot' to deal with the rest of the list.


          Adding the numbers in a list. @@ -43,7 +42,7 @@

          Walking Down a List

    -item (1) of ( ) and all but first of ( ) are the selectors for the List data type. The corresponding constructor is ( ) in front of ( ). +item () of 'list input slot' and all but first of 'list input slot' are the selectors for the List data type. The corresponding constructor is () in front of 'list input slot'.

    Copying a list. diff --git a/cur/programming/3-lists/old/3-three-key-list-ops/2-map.html b/cur/programming/3-lists/old/3-three-key-list-ops/2-map.html index ecb9a05c68..c5bfb0de20 100644 --- a/cur/programming/3-lists/old/3-three-key-list-ops/2-map.html +++ b/cur/programming/3-lists/old/3-three-key-list-ops/2-map.html @@ -18,7 +18,7 @@

    The Map Block (Teacher's Choice)

    - The map block takes two inputs: a function (with a blank input slot) and a list, and it reports a new list. In this new list, each item is the result of running an item of the original input list through the function. For example:
    + The map 'reporter input slot' over 'list input slot' block takes two inputs: a function (with a blank input slot) and a list, and it reports a new list. In this new list, each item is the result of running an item of the original input list through the function. For example:
    map (( )-(1)) over (list (96) (-100) (4.7)) reporting
    map (join ( ) (s)) over (list (cat) (dog) (bird)) reporting
    map (round ( )) over (list (3.14159) (87) (5.4)) reporting
    @@ -27,7 +27,7 @@

    The Map Block (Teacher's Choice)

    You write the function that describes the change, and map applies that function to each item in the input list and then reports the list of values changed by the function.

    -

    The gray ring in map means that the input should be a function. The function can be numeric as in algebra, for example: (3 * ()) + 7 (as we'll explore later) or () - 1 (as shown above), but you can also use other operators like join () (s): the map function above joins each word with the letter 's'. The blank input slot in the function is filled with each list item to make the new list. In algebraic functions, that's the variable, for instance: that's the x in the function f defined by f(x) =3x + 7.

    +

    The gray ring in map 'reporter input slot' over 'list input slot' means that the input should be a function. The function can be numeric as in algebra, for example: (3 * ()) + 7 (as we'll explore later) or () - 1 (as shown above), but you can also use other operators like join () (s): the map function above joins each word with the letter 's'. The blank input slot in the function is filled with each list item to make the new list. In algebraic functions, that's the variable, for instance: that's the x in the function f defined by f(x) =3x + 7.

    diff --git a/cur/programming/3-lists/old/3-three-key-list-ops/3-keep.html b/cur/programming/3-lists/old/3-three-key-list-ops/3-keep.html index bfa8f18887..3bf9bdc13e 100755 --- a/cur/programming/3-lists/old/3-three-key-list-ops/3-keep.html +++ b/cur/programming/3-lists/old/3-three-key-list-ops/3-keep.html @@ -16,7 +16,7 @@

    The Keep Block (Teacher's Choice)

    - The keep block takes a predicate (with a blank input slot) and a list as input and creates a new list keeping only those items from the input list that match some criterion, such as "begins with a vowel," "is less than five characters long," "is even," or "is a vegetable." For example: + The keep items 'predicate input slot' from 'list input slot' block takes a predicate (with a blank input slot) and a list as input and creates a new list keeping only those items from the input list that match some criterion, such as "begins with a vowel," "is less than five characters long," "is even," or "is a vegetable." For example: keep items such that (is () a (number)?) from {5, :), six, 7, elephant, 3} reporting {5,7,3}
    keep items such that (((letter (1) of ()) = (a)) or ((letter (1) of ()) = (o))) from {Ann, Olivia, Jamal, Karl, A.J., Tara} reporting {Ann, Olivia, A.J.}
    keep items such that (() > (5)) from {8, 54, 12.7, .73, -1, 55} reporting {8, 54, 12.7, 55} diff --git a/cur/programming/3-lists/old/3-three-key-list-ops/4-combine.html b/cur/programming/3-lists/old/3-three-key-list-ops/4-combine.html index 3594f6d130..7e370143a4 100755 --- a/cur/programming/3-lists/old/3-three-key-list-ops/4-combine.html +++ b/cur/programming/3-lists/old/3-three-key-list-ops/4-combine.html @@ -34,9 +34,9 @@

    The Combine Block (Teacher's Choice)

    - +
    These COMBINE example images are out of date. --MF, 6/11/21

    - The combine block takes an operation (with two blank input slots) and a list as input and reports a single result: the combination for all of the elements of the list when using the given operation. For example: combine with (()+()) items of (list {5,6,2,3}) reporting 16
    + The combine 'list input slot' using 'reporter input slot' block takes an operation (with two blank input slots) and a list as input and reports a single result: the combination for all of the elements of the list when using the given operation. For example: combine with (()+()) items of (list {5,6,2,3}) reporting 16
    combine with (join words () ()) items of (list {apples, bananas, oranges, grapes}) reporting 'apples bananas oranges grapes'

    diff --git a/cur/programming/3-lists/old/4-combining-list-ops/old/0-processing-data-lists.html b/cur/programming/3-lists/old/4-combining-list-ops/old/0-processing-data-lists.html index 84c5baff22..3e873d2cf5 100644 --- a/cur/programming/3-lists/old/4-combining-list-ops/old/0-processing-data-lists.html +++ b/cur/programming/3-lists/old/4-combining-list-ops/old/0-processing-data-lists.html @@ -38,6 +38,7 @@

    Processing Data in Lists

    Betty: OK, let's try it. I'm just going to make up a variable called "list of numbers". Then we'll keep the numbers over 50.
    Betty builds this expression: keep(()>50)from(listofNumbers)
    Alphie: Then we add 10 to every item using map. And the list we're mapping over is everything over 50 that we kept, so let's just drag everything in our keep expression in there.
    +
    This image of map is outdated. --MF, 6/11/21
    Alphie builds this expression using Betty's: map(()+10)over(keep...)
    Betty: Your last idea was to add all these new numbers up, right? So we'll use combine with and addition, and our list is everything in the map expression.
    Betty adds to Alphie's expression: combine(addition)itemsof(map(keep...))
    diff --git a/cur/programming/3-lists/old/pre-2017/5-search-and-data/9-predict-by-number-of-words.html b/cur/programming/3-lists/old/pre-2017/5-search-and-data/9-predict-by-number-of-words.html index 96c8f1dc80..4c3bb569a9 100755 --- a/cur/programming/3-lists/old/pre-2017/5-search-and-data/9-predict-by-number-of-words.html +++ b/cur/programming/3-lists/old/pre-2017/5-search-and-data/9-predict-by-number-of-words.html @@ -18,7 +18,7 @@

    Spam and Ham: Predictions!

    classify a message that evaluates to HAM
    classify a message that evaluates to SPAM
    - Implement in snap, and use it to classify the messages in our data. You can use a regular loop to call your classify on the second item in each row of the data, or you might use this faster method using the keep block:
    + Implement in snap, and use it to classify the messages in our data. You can use a regular loop to call your classify on the second item in each row of the data, or you might use this faster method using keep items 'predicate input slot' from 'list input slot':
    using keep to apply a custom classify method to the data
  • diff --git a/cur/programming/3-lists/optional-projects/1-astrid.html b/cur/programming/3-lists/optional-projects/1-astrid.html index e03032b4bf..7ce881011d 100644 --- a/cur/programming/3-lists/optional-projects/1-astrid.html +++ b/cur/programming/3-lists/optional-projects/1-astrid.html @@ -23,8 +23,8 @@

    Curve Stitching

    - In this project you will create a mathematical art design and explore its variations.
    - Curve stitching design being drawn line by line in each quadrant + In this project, you will create a mathematical art design and explore its variations. (Click the picture to see an animation.)
    + Curve stitching design being drawn line by line in each quadrant

    diff --git a/cur/programming/3-lists/optional-projects/2-animation-studio.html b/cur/programming/3-lists/optional-projects/2-animation-studio.html index acce21cab9..e18cf89fee 100644 --- a/cur/programming/3-lists/optional-projects/2-animation-studio.html +++ b/cur/programming/3-lists/optional-projects/2-animation-studio.html @@ -33,8 +33,7 @@

    Animation Studio

    1. -
      What video?? --MF, 6/15/20
      - Watch the following video. Discuss with your partner how would you design such a project. Be sure to explore what data needs to be tracked and how lists can be employed to keep track of this data.
      + Discuss with your partner how would you design such a project. Be sure to explore what data needs to be tracked and how lists can be employed to keep track of this data.
    2. Tips to guide your thinking:
      diff --git a/cur/programming/4-internet/1-reliable-communication/1-what-is-internet.html b/cur/programming/4-internet/1-reliable-communication/1-what-is-internet.html index 4c43608b5a..0fec5e04bc 100644 --- a/cur/programming/4-internet/1-reliable-communication/1-what-is-internet.html +++ b/cur/programming/4-internet/1-reliable-communication/1-what-is-internet.html @@ -8,7 +8,20 @@

      What Is the Internet?

      -
      +
      + Consider adding BTB content back: +
    3. + Several pages in this lab suggest a brief reading from the Blown to Bits appendix in the "If There Is Time" sections: + +
    4. +
      +

      In this lab, you will learn how the Internet works.

      On this page, you will learn the basics of what the Internet is, what's most important about how it works, and what it means to store information in "the cloud."

      @@ -51,7 +64,7 @@

      How Does the Internet Work?

      The Internet isn't just a network of computers, though. It's a network of networks. The connection points between networks are called routers, networking devices that route traffic between subnetworks on the Internet. Making sense of the information happens at the destination computer.

      - +
      • A router is a computer that passes information from one network to another.
      • diff --git a/cur/programming/4-internet/2-cybersecurity/5-security-risks.html b/cur/programming/4-internet/2-cybersecurity/5-security-risks.html index 86aa73fd27..59210df523 100644 --- a/cur/programming/4-internet/2-cybersecurity/5-security-risks.html +++ b/cur/programming/4-internet/2-cybersecurity/5-security-risks.html @@ -49,7 +49,7 @@

        Common Security Issues with Public Systems

        rogue access point: IOC-2.C.3, IOC-2.C.4

        Unless your data is encrypted, it can be read or modified as it's being sent over public networks. One way that this can happen is through a rogue access point.

        -
        : A rogue access point is a wireless access point that gives access to a secure network without the authorization of the network administrator.
        +
        :

        A rogue access point is a wireless access point that gives access to a secure network without the authorization of the network administrator.

        A rogue access point may be installed by someone trying to improve access to the network or by an attacker. But either way, the lack of proper security can allow data being sent over that WiFi network to be intercepted. For example, if your computer has password access to a WiFi network, and you enable Bluetooth network sharing, you are allowing anyone in Bluetooth range of your computer access to the secure network.

        Is Too Much Security Possible?

        diff --git a/cur/programming/4-internet/4-representation-compression/3-representing-numbers.html b/cur/programming/4-internet/4-representation-compression/3-representing-numbers.html index 788e343e2b..5a23674e83 100644 --- a/cur/programming/4-internet/4-representation-compression/3-representing-numbers.html +++ b/cur/programming/4-internet/4-representation-compression/3-representing-numbers.html @@ -79,7 +79,7 @@

        Bignums

        A multiple-word integer is called a
          -
          You can use bignums in any Snap! project by importing the "Infinite precision integers, exact rationals, complex" library.

          You learned to import libraries on the Libraries page.

          They did not. --MF, 6/13/19
          +
          You can use bignums in any Snap! project by importing the "Bignums, exact rationals, complex #s" library.

          You learned to import libraries on the Libraries page.

          They did not. --MF, 6/13/19
        1. Click on this block in the scripting area:
          USE BIGNUMS (true) diff --git a/cur/programming/4-internet/4-representation-compression/6-compression.html b/cur/programming/4-internet/4-representation-compression/6-compression.html index ac04a6d7d9..6d48d2ac78 100644 --- a/cur/programming/4-internet/4-representation-compression/6-compression.html +++ b/cur/programming/4-internet/4-representation-compression/6-compression.html @@ -24,7 +24,7 @@

          Data Compression

          There are two broad categories of data compression algorithms: lossless and lossy, depending on whether information is lost.

          : Lossless Compression -

          Lossless data compression algorithms (such as PNG) are reversible (there is no loss in quality); you can reconstruct the original data.

          +

          Lossless data compression algorithms (such as PNG) are reversible (there is no loss in quality); you can reconstruct the original data.

          DAT-1.D.4
          @@ -57,7 +57,7 @@

          Data Compression

          DAT-1.D.2

          Those six values (60, FFFFFF, 5, E5A84A, 93, FFFFFF) can be reconstructed into that whole first row of the image (158 pixels). So, fewer bits does not necessarily mean less information.

          : Lossy Compression -

          Lossy data compression algorithms are not fully reversible; you can reconstruct only an approximation of the original data.

          +

          Lossy data compression algorithms are not fully reversible; you can reconstruct only an approximation of the original data.

          DAT-1.D.5

          Lossy Compression works by removing details that people aren't likely to notice. The most commonly used lossy compression algorithm for pictures is called JPEG (or JPG, both pronounced "jay peg" for "Joint Photographic Experts Group," the committee that invented it). JPEG works by preserving most of the brightness information for each pixel (since human eyes are sensitive to that) and performing a kind of averaging process to the color information (because human eyes aren't as good at distinguishing color, especially colors close to white).

          diff --git a/cur/programming/5-algorithms/1-searching-lists/7-comparing-search-algorithms.html b/cur/programming/5-algorithms/1-searching-lists/7-comparing-search-algorithms.html index a4c18154d8..3e82051ef6 100755 --- a/cur/programming/5-algorithms/1-searching-lists/7-comparing-search-algorithms.html +++ b/cur/programming/5-algorithms/1-searching-lists/7-comparing-search-algorithms.html @@ -22,9 +22,7 @@

          Removing Duplicates

            -
          1. Experiment with the all but first of 'list input slot' block using a few different input lists. Talk with Your Partner - What does this block report?
          2. - +
          3. Experiment with the all but first of 'list input slot' block using a few different input lists. Talk with Your Partner What does this block report?
          4. Finish building the are the items distinct? predicate, which is started below. Since you're writing a predicate, your procedure should always report true or false.
            diff --git a/cur/programming/5-algorithms/2-simulation/2-disease-spread.html b/cur/programming/5-algorithms/2-simulation/2-disease-spread.html index a542b7462e..39e7b03993 100644 --- a/cur/programming/5-algorithms/2-simulation/2-disease-spread.html +++ b/cur/programming/5-algorithms/2-simulation/2-disease-spread.html @@ -11,62 +11,74 @@

            Disease Spread Project

            -
            -

            Brian wants to do something with a real example (like weather modeling). --MF, 2/20/18

            -

            PG: SCRAP. What I really mean is change, but major change. Again, what we're seeing is how clever someone else can be. Learning to model is different. The first few pages of DHH's Calculus text does a great job if building an intellectual model that could be programmed in Snap. Weather could be ok, but I think the disease spread might be easier to understand and model. I'd keep the /idea/ here, but stop trying to show off /our/ projects and instead teach a kid how to model.

            +
            +

            Paul suggested we review DHH's Calculus text, which does a great job of building an intellectual model that could be programmed in Snap. --MF, 6/27/21 with BH

            On this page, you will model the spread of a disease in a population.

            - Simulation of a disease spreading in a population.  A single infected individual eventually causes everyone to be infected. -
            Someone could easily cut frames to make this 2MB or even less. --MF, 5/31/20
            + Simulation of a disease spreading in a population.  A single infected individual eventually causes everyone to be infected. +

            Note: There was a disease spread simulation in BJC long before covid-19, but we want to acknowledge that right now the spread of a disease isn't an abstract question. Everyone has been affected by isolation at home, and some students may have lost loved ones to this disease. Medical researchers do use simulations (much more complex than this one) to try to predict the future course of the disease.

            -

            Suppose you are a medical researcher at the Centers for Disease Control (CDC) and would like to understand the factors that contribute to the spread of a new disease. In particular, you want to know the effect of population size on the time it takes for everyone to be infected.

            +

            Suppose you are a medical researcher and would like to understand the factors that contribute to the spread of disease. In particular, you want to know the effect of population size on the time it takes for everyone to be infected, under the simplifying assumption that once infected, a person stays infected.

              -
            1. Talk with Your Partner What would be a sensible hypothesis on how population size affects the elapsed time?
            2. -
            3. What if the space the people lived in (in the simulation, the size of the Snap! stage) was twice as big?
            4. +
            5. Talk with Your Partner What would be a sensible hypothesis on how population size affects the elapsed time?
            6. +
            7. What if the people interacted with one and other more frequently?
            -

            You may not have enough data from actual outbreaks to test your hypothesis and make any meaningful conclusions, and it would be unethical to induce the disease in a population just to gather new data. In this situation, a simulation would be the best option to generate data to test your hypotheses without the constraints of time, cost, and ethics.

            -

            In this project, you will simulate the spread of a disease within a small population and explore the effects of variables such as population size and speed of human interaction on the spread of disease.

            +

            You may not have enough data to test your hypothesis, and it would be unethical to induce the disease in a population just to gather new data. A simulation would allow you to test your hypotheses without the constraints of time, cost, and ethics.

              -
            1. - Write a simulation that will:
              +
            2. + Click here to load this file. Then save it to your Snap! account.
              + It includes:
                -
                How do you make a collection of identical sprites? Create a single person sprite, and use the create a clone of myself block. You learned how to clone a sprite in Unit 3 Lab 1 Page 5: Building a Tic-Tac-Toe Board.
                -
              • Take 3 inputs: the population size, the percentage of the population initially infected, and the speed at which the simulated people should be moving around.
              • -
              • Infect a healthy person when they touch a sick person.
              • -
              • When the entire population becomes sick, stop the animation and report the duration of the outbreak.
              • +
              • a population variable that stores the total number of people (represented by clones of a sprite)
              • +
              • a percent initially infected variable that stores the fraction of the population who are sick at the beginning of the simulation
              • +
              • a speed variable that stores the pace at which the clones move
              • +
              • a sprites ready? variable that stores a Boolean that keeps track of whether or not all the clones have been created and the simulation can begin
              • +
              • a number infected variable that keep track of how many clones are currently infected
              • +
              • an infected? sprite-local variable that stores a Boolean that keeps track of whether or not a clone is sick (each clone will have its own separate variable with that name)
              • +
              • two costumes, sick ('sick' sprite costume: a small red person) and well ('well' sprite costume: a small blue person), that display the status of each clone
              • +
              • +
                +

                You learned how to clone a sprite in Unit 3 Lab 1 Page 5: Building a Tic-Tac-Toe Board.

                +

                The primitive block my (neighbors) reports a list of sprites that are near the sprite that uses it.

                +
                + a simulate disease function for you to complete that takes three inputs: total population, percent initially infected, and sprite speed; creates the clones that enact the simulation; and outputs the time until the entire population is infected +
              • +
              • an initialize simulation block that initializes the global variables and sets the parent sprite costume
              • +
              • a touching infected person? predicate for you to complete that checks whether the current clone is being exposed to the disease
              • +
              • an initialize clone block that decides whether a clone will start out sick and positions it randomly on the stage
              • +
              • a when I start as a clone script for you to complete that moves the clones until they are all infected
            3. -
            -
            - -
            Using clones is a form of parallelism. But as you learned on the Unit 5 Lab 1 Page 8: Parallelism, because the clones are all running on one processor, cloning doesn't give you any speedup.
            - -
            -
              -
            1. Talk with Your Partner Discuss how your simulation may be similar to and different from a real-life disease outbreak. Identify the simplifying assumptions you made in this simulation.
            2. +
            3. Complete the simulate disease function, the touching infected person? predicate, and the when I start as clone script.
            4. +
            5. Talk with Your Partner Discuss how your simulation is similar to and different from a real-life disease outbreak. Identify the simplifying assumptions you made in this simulation.
            6. +
            +
            +

            You want to know the effect of population size on the time elapsed. Because there is some randomness in the simulation, you are going to get some variation in the reported time. (This isn't a bug; in real life, random events affect the elapsed time.)

            +
            +
            1. AAP-3.F.8
              - You want to know the effect of population size on the time elapsed. Because there is some randomness in the simulation, you are going to get some variation in the reported time. (This isn't a bug; in real life, random events affect the elapsed time.) Write a function in Snap! that runs the simulation 10 times while keeping the percent initially infected at 10 and the speed of infection at 2, and reports the average time elapsed.
              + Write a function that takes population size as input, runs the simulation ten times, keeps the percent initially infected at 10 and the speed of infection at 2, and reports the average time elapsed.
              average time for disease spread with population size: ()
            2. AAP-3.F.7
              -
            3. Call this function four times with different populations (50, 100, 150, and 200), and write down the results. Create a refined hypothesis about the relationship between population size and time for the entire population to be infected.
            4. +
              Using clones is a form of parallelism. But as you learned on the Unit 5 Lab 1 Page 8: Parallelism, because the clones are all running on one processor, cloning doesn't give you any speedup.
              +
            5. Call this function four times with different populations (50, 100, 150, and 200), and write down the results. Create a refined hypothesis about the relationship between population size and time for the entire population to be infected.
            6. In real disease scenarios, not everyone ends up getting sick. How would you decide if the simplifications you used in a simulation invalidate the conclusions you might draw?
            -

            This is a simplified model. There are many things you could do to make the model more realistic. For example, you could make the infected people heal over time, or you could add doctor sprites who can heal sick sprites, but you will always have to make some simplifications.

            +

            This is a simplified model. There are many things you could do to make the model more realistic. For example, you could make the infected people get better over time or some people could be immune to the disease, but you will always have to make some simplifications.

            -
            Do we need the commented out text in the TIF? --MF, 5/31/20
            1. Now conduct a similar experiment holding population size constant and varying the percent initially infected. Come up with a hypothesis for this relationship.
            2. @@ -80,10 +92,10 @@

              Disease Spread Project

            3. a single line where the customers stand in arrival order and wait for the next available teller, or
            4. separate lines for each teller.
      -
      Do we need this commented out text? --MF, 5/31/20
      - Design and implement two simulations in Snap! to help the bank determine the average wait time for customers in each scenario in order to choose the best option.
      + Design and implement two simulations in Snap! to help the bank determine the average wait time for customers in each scenario in order to choose the best option.
      Single queueMultiple queues +
    5. Do some research: Why do (most) banks use a single teller line, but (most) grocery stores use a line per checkout station?
    diff --git a/cur/programming/5-algorithms/2-simulation/3-disease-spread-old.html b/cur/programming/5-algorithms/2-simulation/3-disease-spread-old.html new file mode 100644 index 0000000000..18328d4680 --- /dev/null +++ b/cur/programming/5-algorithms/2-simulation/3-disease-spread-old.html @@ -0,0 +1,130 @@ + + + + + + + + + + Unit 5 Lab 2: Models and Simulations, Page 3 + + + +

    Disease Spread Project

    +
    +
      +
    • EK 1.3.1E Computing enables creative exploration of both real and virtual phenomena.
    • +
    • EU 2.3 Models and simulations use abstraction to generate new understanding and knowledge.
    • +
      LO 2.3.1: using a model of a population and simulating interactions among that population.
      +
    • LO 2.3.1 Use models and simulations to represent phenomena. [P3]
    • +
    • EK 2.3.1A Models and simulations are simplified representations of more complex objects or phenomena.
    • +
    • EK 2.3.1B Models may use different abstractions or levels of abstraction depending on the objects or phenomena being posed.
    • +
    • EK 2.3.1C Models often omit unnecessary features of the objects or phenomena that are being modeled.
    • +
    • EK 2.3.1D Simulations mimic real world events without the cost or danger of building and testing the phenomena in the real world.
    • +
      LO 2.3.2 is in #1, 4, and 5
      +
    • LO 2.3.2 Use models and simulations to formulate, refine, and test hypotheses. [P3]
    • +
    • EK 2.3.2A Models and simulations facilitate the formulation and refinement of hypotheses related to the objects or phenomena under consideration.
    • +
    • EK 2.3.2B Hypotheses are formulated to explain the objects or phenomena being modeled.
    • +
    • EK 2.3.2C Hypotheses are refined by examining the insights that models and simulations provide into the objects or phenomena.
    • +
    • EK 2.3.2D The results of simulations may generate new knowledge and new hypotheses related to the phenomena being modeled.
    • +
    • EK 2.3.2E Simulations allow hypotheses to be tested without the constraints of the real world.
    • +
    • EK 2.3.2F Simulations can facilitate extensive and rapid testing of models.
    • +
    • EK 2.3.2G The time required for simulations is impacted by the level of detail and quality of the models, and the software and hardware used for the simulation.
    • +
    • EK 2.3.2H Rapid and extensive testing allows models to be changed to accurately reflect the objects or phenomena being modeled.
    • +
    +
    + +
    Brian wants to do something with a real example (like weather modeling). --MF, 2/20/18
    + +
    +

    On this page, you will model the spread of a disease in a population.

    + + + + Simulation of a disease spreading in a population.  A single infected individual eventually causes everyone to be infected. +
    +

    Suppose you are a medical researcher at the Centers for Disease Control (CDC) and would like to understand the factors that contribute to the spreading of a new disease across a population. In particular, you would like to know the effect of population size on the rate at which the disease spreads.

    + +
    +
      +
    1. What would be a sensible hypothesis on how population size relates to the rate of the spread of the disease?
    2. +
    +
    + +

    You may not have enough data from actual outbreaks to test your hypothesis and make any meaningful conclusions, and it would be unethical to induce the disease in some population in order to gather new data. In this situation, a simulation would be the best option to generate data in order to test your hypotheses without the constraints of time, cost, and ethics.

    +

    In this project, you will simulate the spread of a disease within a small population and explore the effects of variables such as population size and speed of human interaction on the spread of disease.

    + +
    +
      +
    1. Play with the Snap! file + + + linked here to get a feel for the simulation program you will be writing.
    2. +
    3. + Your code should:
      +
        +
      • Ask the user for 3 inputs: the population size, the percentage of the population initially infected, and the speed at which the people should be moving.
      • +
      • Create a single person sprite and use the create a clone of myself block to generate a population with the size inputted by the user.
      • +
        Do this on your own but if you get stuck, you can use this page for hints.
        +
      • Make the user-specified percentage of the population sick and the rest of the population healthy.
      • +
      • Have a timer measure the duration of the outbreak (until everyone is infected).
      • +
      • Have the people move around with the constant speed inputted by the user.
      • +
      • Make sure that when a healthy person collides with a sick person, they also becomes sick.
      • +
      • Stop the animations and the timer when the entire population becomes sick.
      • +
      +
    4. +
    5. Discuss how your simulation may be similar to and different from a real life disease outbreak. Identify the simplifying assumptions you made in this simulation.
    6. +
    7. + Study the relationships between the various variables in the simulation: +
        +
      • the population size
      • +
      • the percentage of the population initially sick (percent initially sick)
      • +
      • the speed at which the people move
      • +
      • time elapsed (at the point when the entire population becomes sick)
      • +
      +
      Brian, I made light edits to the following line and I split off the end of #5 into a new <li>; if you agree, this changes needs to be made to the solution file too. Also, the solution file still has single-letter variables in it toward the end. --MF, 2/22/18
      + Create a hypothesis predicting the pattern(s) that will emerge in the simulations.
      +
      +

      For example, to understand the effect of the population size on the time it takes the disease to fully spread (time elapsed), you might fix population size at 10 and speed at 2, and use your simulation to make a chart of time elapsed (on the vertical axes) as a function of population size (on the horizontal axis) in increments of 10 for population size.

      +

      Perform similar experiments to understand the effect of initial percentage of the sick and to understand the effect of agent speed.

      +

      Since the results of each run are partly random, you may need to run each particular simulation several times and take an average.

      +
      + +
    8. +
    9. Create a visual graph of your findings. Do you see any patterns? Do they agree with your hypothesis? If not, make a new hypothesis. How can you study the effects of other variables with your simulations?
    10. +
    +
    +

    This is a simplified model. There are many things you could do to make the model more realistic. For example, you could make the infected people heal over time, or you could add doctor sprites who can heal sick sprites. But if you included all the things that happen in real human populations in your simulation, it would slow down the simulation too much to use. Updating your software or upgrading your hardware may help you include more details in your simulation, but you will always have to make some simplifications.

    +
    There was a time when weather scientists could do a good job of predicting the weather with a complicated model. The only problem was that the computers back then took several days to run the model, so the predictions weren't ready in time. Computers these days can run many complicated weather models fast enough to predict the weather reasonably well.
    +
    +
      +
    1. + Here are some possible variations on this simulation that could make it more realistic. Save a copy of your work before exploring one or more of these variations:
      +
        +
      • Give a probability to being infected when a healthy person encounters a sick person.
      • +
      • Let the infected people slow down in speed.
      • +
      • Let the infected people heal either with time or by a probability.
      • +
      • Let those infected and then healed become immune to the sickness.
      • +
      • Introduce doctor sprites that heal the sick upon encounter.
      • +
      • At the start of simulation, introduce vaccination to a given percentage of the population.
      • +
      +
    2. +
    3. Design and implement a predator-prey simulation in Snap!. For example, you could model an environment with wolf and deer populations where the wolf prey on the deer. What are some parameters you need to incorporate into your model so you can simulate realistic fluctuations in the populations of predator and prey?
    4. +
    5. + Imagine you work at a bank that wants to minimize customer wait times in line. The bank is considering two alternatives: +
        +
      • a single line where the customers stand in arrival order and wait for the next available teller, or
      • +
      • separate lines for each teller.
      • +
      + Design and implement two simulations in Snap! to help the bank determine the average wait time for customers in each scenario in order to choose the best option.
      + Single queueMultiple queues +
    6. +
    +
    + + + diff --git a/cur/programming/5-algorithms/3-turning-data-information/3-importing-data.html b/cur/programming/5-algorithms/3-turning-data-information/3-importing-data.html index 48047f506b..cb89d46077 100644 --- a/cur/programming/5-algorithms/3-turning-data-information/3-importing-data.html +++ b/cur/programming/5-algorithms/3-turning-data-information/3-importing-data.html @@ -43,9 +43,9 @@

    Importing and Accessing Data

      -
    1. Experiment with different inputs to the item () of 'list input slot' block to access different rows in the dataset.
    2. +
    3. Experiment with different inputs to the item () of 'list input slot' block to access different rows in the dataset.
    4. Talk with Your Partner How does the first item of your data set (item (1) of) differ from the other items?
    5. -
    6. Locate the all but first of 'list input slot' block and determine what it does with your data.
    7. +
    8. Locate the all but first of 'list input slot' block and determine what it does with your data.
    9. Build selectors:
        diff --git a/cur/programming/5-algorithms/3-turning-data-information/5-visualizing-data.html b/cur/programming/5-algorithms/3-turning-data-information/5-visualizing-data.html index 9ac5ddbaf6..4431672576 100644 --- a/cur/programming/5-algorithms/3-turning-data-information/5-visualizing-data.html +++ b/cur/programming/5-algorithms/3-turning-data-information/5-visualizing-data.html @@ -23,8 +23,7 @@

        Grouping Data

        Classifying data is extracting groups of data with a common characteristic.

    Another thing that's often done in data science is grouping (or classifying) data. For example, here is the cars data grouped by vehicle make (column 14):
    - group (data of table (cars)) by field (14) by intervals of ( )) reporting a table with three columns; column A contains each make of car from the original data set; column B shows the total number of cars in the original data set that are of that make; column C shows a picture of a list in each row of the table.
    + group (data of table (cars)) by field (14) by intervals of ( )) reporting a table with three columns; column A contains each make of car from the original data set; column B shows the total number of cars in the original data set that are of that make; column C shows a picture of a list icon in each row of the table.
    • Column A shows all of the vehicle makes (field 14 of each record).
    • Column B shows the total number of vehicles of each make.
    • @@ -32,7 +31,7 @@

      Grouping Data

    -

    The by intervals of input to group should be left empty when, as in this example, the field on which you're grouping is text rather than numbers. Later on this page you'll see how to use intervals in graphing.

    +

    The by intervals of input to the group table block should be left empty when, as in this example, the field on which you're grouping is text rather than numbers. Later on this page, you'll see how to use intervals in graphing.

    @@ -46,8 +45,7 @@

    Grouping Data

    • How many Toyotas are in the database?
    • -
    • Which brand in the table has the - most models listed?
    • +
    • Which brand in the table has the most models listed?
    • How many 2010 Hyundais are in the database? (This requires looking inside one of the lists in column C, so you'd need two keep functions.)

    Pipe may be useful for questions that require looking inside the inner lists of the grouped data (in column C).

    @@ -60,12 +58,10 @@

    Grouping Data

    Plotting Data

    -

    image needs alt/title text. --MF, 6/27/19
    - The bar chart function works like the group function, but with special features for numeric data: it allows you to select upper and lower limits of the data; you can have a range of values in one bucket, such as values 6–10, values 11–15, and so on; and it sorts the groups. For example, here is the cars data grouped by city MPG (column 9):
    - + The bar chart function works like the group function, but with special features for numeric data: it allows you to select upper and lower limits of the data; you can have a range of values in one bucket, such as values 6–10, values 11–15, and so on; and it sorts the groups. For example, here is the cars data grouped by city MPG (column 9):
    + bar chart of table (data of table (cars)) groups by field: (9) from: (5) to: (50) interval: (5) reporting a table with three columns and 10 rows; the values in the first column are multiples of 5 from 5 to 50; the values in the second column are 0, 311, 1554, 2057, 879, 267, 6, 2, 0, 0; the values in the third column are each a list icon indicating that a sublist is stored in that field
    • Now, Column A shows city MPG (field 9 of each record) grouped into intervals of 5 and sorted.
    • -
      It's potentially confusing that there are two inputs of 5 in the image because when you read the bullet above it's temping to see that as being about the first and second inputs rather than the first and last. --MF, 7/13/20
    • As before, Column B shows the total number of vehicles within each MPG range (0–5, 6–10, 11–15, etc.)
    • As before, Column C contains a list of all the data from cars within that MPG range (such as all the data for the 879 cars that get between 21 and 25 MPG in the city).
    @@ -75,46 +71,37 @@

    Plotting Data

    You can plot the data from bar chart to visualize them:
    -

    images need alt/title text. --MF, 6/27/19
    - - + plot bar chart (bar chart of table (data of table (cars)) grouped by field: (9) from: (5) to: (50) interval: (5)) bars at x: (-200) y: (-100) width: (400) height: (200) + bar graph running from 0 to 50 on the horizontal axis and from 0 to 2050 on the vertical axis with bars indicating 0 between 0 and 5, about 300 between 5 and 10, about 1500 between 10 and 15, about 2000 between 15 and 30, about 800 between 20 and 25, about 200 between 25 and 30, and 0 beyond 30

    -
    Nothing to pipe, really, with the new blocks. -bh -
    -
    image needs alt/title text. --MF, 6/27/19
    -

    Click to see an example of using pipe with plot.

    -
    -

    - This plot instruction with pipe will generate the same image as the plot instruction without pipe above.
    - -

    -
    -
    -
    -
    + +
      -
      This is kind of an awkward and anti-climatic place to land. Why aren't they making a histogram about their chosen dataset and using it for further analysis? I suggest adding problem 9 (pasted just below) from the CSTA version here before the mode analysis. --MF, 7/13/20 -
    1. Plot a few bar charts of some fields from your dataset and make at least one new observation about your data.
    2. -
      -
      Brian, these images need alt/title text. Also, can you please remove the sprite showing at the bottom? --MF, 7/13/20
      +
    3. Plot a few bar charts of some fields from your dataset and make at least one new observation about your data.
    4. -

      The mode of a data set is the value that appears most often in it.

      - Here is a bar chart of field 11 from the cars data set (highway MPG) with MPG values from 5 to 50, using an interval of 3. Identify the mode. It will be a range of values such as 13–15 or 16–18.
      - - +

      The mode of a data set is the value that appears most often in it.

      + Here is a bar chart of field 11 from the cars data set (highway MPG) with MPG values from 5 to 50, using an interval of 3. Identify the mode. (It will be a range of values such as 13–15 or 16–18.)
      + [same plot bar chart instruction as above, but with grouped by field: (11) and interval: (3)] plot bar chart (bar chart of table (data of table (cars)) grouped by field: (11) from: (5) to: (50) interval: (3)) bars at x: (-200) y: (-100) width: (400) height: (200) + bar graph running from 0 to 51 on the horizontal axis and from 0 to 1050 on the vertical axis with bars indicating 0 for less than 9, about 30 between 9 and 12, about 220 between 12 and 15, about 550 between 15 and 18, about 900 between 18 and 21, about 900 between 21 and 24, about 1000 between 24 and 27, about 550 between 27 and 30, about 300 between 30 and 33, about 250 between 33 and 36, about 20 between 36 and 39, about 20 between 39 and 42, and 0 beyond 42
    5. Here is another bar chart with all the inputs the same as before, but with an interval of 6. Identify the mode.
      - - + [same plot bar chart instruction as above, but with grouped by field: (11) and interval: (6)] plot bar chart (bar chart of table (data of table (cars)) grouped by field: (11) from: (5) to: (50) interval: (6)) bars at x: (-200) y: (-100) width: (400) height: (200) + bar graph running from 0 to 54 on the horizontal axis and from 0 to 1800 on the vertical axis with bars indicating 0 between 0 and 6, about 30 between 6 and 12, about 800 between 12 and 18, about 1800 between 18 and 24, about 1600 between 24 and 30, about 700 between 30 and 36, about 50 between 36 and 42, and 0 beyond 42
    6. -
    7. Talk with Your Partner How can these results both be correct? (There's nothing wrong with the graphs.)
    8. -
    9. Talk with Your Partner Why would you ever use an interval larger than 1? If you have time, research this question.
    10. +
    11. Talk with Your Partner How can these results both be correct? (There's nothing wrong with the graphs.)
    12. +
    13. Talk with Your Partner Why would you ever use an interval larger than 1?
    -
    I'm wondering about offering the kids the video or part of it on the page or in the TIF (the teachers should definitely see it). --MF, 6/26/19
    - +
    +
      +
    1. Research the question of why would you ever use an interval larger than 1.
    2. +
    +
    + + + diff --git a/cur/programming/5-algorithms/6-tic-tac-toe/3-developing-strategy.html b/cur/programming/5-algorithms/6-tic-tac-toe/3-developing-strategy.html index 840e674132..91e8badcaf 100644 --- a/cur/programming/5-algorithms/6-tic-tac-toe/3-developing-strategy.html +++ b/cur/programming/5-algorithms/6-tic-tac-toe/3-developing-strategy.html @@ -56,7 +56,7 @@

    Developing a Gameplay Strategy

  • Play part of a game, and then test winning triple for both inputs (X and O). Play a little more, and then test them both again. Fix any bugs.
  • What does winning triple report if there is no winning triple?
  • -
  • Now write the code inside the winning square for player () block. Make sure it works even if there is no winning square.
  • +
  • Now write the winning square for player () block. Make sure it works even if there is no winning square.
  • Click for a hint about winning square.
    diff --git a/cur/programming/5-algorithms/optional-projects/other-languages.html b/cur/programming/5-algorithms/optional-projects/other-languages.html new file mode 100644 index 0000000000..5ce6bdf907 --- /dev/null +++ b/cur/programming/5-algorithms/optional-projects/other-languages.html @@ -0,0 +1,1228 @@ + + + + + + Unit 5 Optional Project + + + +

    Other Programming Languages

    + +
    + I changed the name, so as not to imply that they now know all about + Snap! and should move on. +
    + +
    On this page, you will learn about other programming languages and how to learn them, now that you know Snap!.
    + +

    Sequential Languages

    + +

    A programming language is characterized by two things: a philosophy of programming and details of notation. + Most modern programming languages, including Snap!, are + multiparadigm, which means that they take ideas from + several different approaches to programming style. Nevertheless, + most are basically sequential (do this instruction, then + do this, then do this). This includes Snap!, even though + you have learned some composition (nesting) of functions and + some ideas about sprites as objects.

    +

    Learning another language of the same type is much easier than learning your first one. For example, here’s the binary search function from + Lab 1 of this unit: +

    + binary search for (value) in (data) {
+            script variables (low) (high) (current index) (current item)
+            set (low) to (1)
+            set (high) to (length of (data))
+            repeat until ((low) > (high)) {
+                        set (current index) to (average of (low) and (high)) #comment: find the middle word
+                        set (current item) to (item (current index) of (data))
+                        if ((current item) = (value)) { report (true) }
+                        else {
+                                    if ((current item) > (value)) #comment: eliminate half the list {
+                                                set (high) to ((current index) – (1))
+                                    } else { set (low) to ((current index) + (1)) }
+                        }
+            }
+            report (false)
+} + +

    Python

    + +

    Here's the same procedure written in Python:

    +
    +def binary_search(value, data):
    +    low = 0
    +    high = len(data)-1
    +    while (low <= high):
    +        current_index = average(low, high)    # find the middle word
    +        current_item = data[current_index]
    +        if (current_item == value):
    +            return True
    +        elif (current_item > value):          # eliminate half the list
    +            high = current_index-1
    +        else:
    +            low = current_index+1
    +    return False
    +
    + +

    For the most part, this is line for line the same as the Snap! version. + Apart from tiny details such as return instead of + report, there are a few more significant differences in notation: +

      +
    • + In Python, there's nothing like the script + variables block in Snap!. Variables are + local to procedures automatically, unless you use a + global or nonlocal statement to + tell Python to look for a variable defined outside this + procedure. This is a good design choice, because it + encourages programmers to use global variables only when + really necessary. +
    • +
    • + Python uses indentation (how many spaces at the beginning of each line) to determine the extent of control structures + that would be C-shaped blocks in Snap!. +
    • +
    • + As in many (but not all!) text-based languages, the first item of + a list is item number zero, not item one. They have a reason + for this, but it's still confusing: Shouldn't the 27th item of + a list be item number 27? +
    • +
    • + In Snap!, the nesting of blocks is visually + apparent, so there's no ambiguity about whether you + meant + 3*(4+5) + or + (3*4)+5. + But text languages have to use the order-of-operations rules + that you learned in elementary school, and allow the use + of parentheses if you want some other order. +
    • +
    • + In Python, you can't have a + space inside a variable name, like current item in + Snap!. Instead, Python programmers often use + underscore characters (_) inside variable names. +
    • +
    • + The most annoying one: Like many (but not all!) + text-based languages, Python uses the character + = to set the value of a variable, like the + set block in Snap!. But that's not + what "=" means! In every context other than + programming, x=3 is telling the reader that + the value of x is 3, not a command + to change the value to 3. In other words, it + means = block. + The Python equivalent of the + Snap! = predicate is called + ==. Many, many bugs, even among experienced + programmers, come from this confusing notation. And it's + needlessly hard to make sense of programming when you're + confronted with a statement such as x=x+1. + This design choice is inherited indirectly from Fortran, + invented back in the 1950s, when computers could display + only 64 different characters, so there were fewer options + available, but they still could have used a multi-character + sequence such as <--. + (If you have to program in a language that uses + = for assignment, learn to pronounce it + "gets," as in "x gets 3," rather than "equals," + so you don't add to the confusion. But you still pronounce + == as "equal equals.") + +
      I want a gold star for not putting "have to" in italics.
      + +
    • +
    +

    + +

    JavaScript

    + +

    Here's the same procedure written in JavaScript:

    +
    +function binarySearch(value, data) {
    +    var low, high, currentIndex, currentItem;
    +    low = 0;
    +    high = len(data)-1;
    +    while (low <= high) {
    +        currentIndex = average(low, high);    // find the middle word
    +        currentItem = data[currentIndex];
    +        if (currentItem == value) {
    +            return true;
    +        } else if (currentItem > value) {     // eliminate half the list
    +            high = currentIndex-1;
    +        } else {
    +            low = currentIndex+1;
    +        }
    +    }
    +    return false;
    +}
    +
    + +
    +

    The syntax of a language is the notation it uses + (punctuation, words reserved for specific purposes, etc.). Human + languages have syntax, too: nouns vs. verbs and so on.

    +

    The semantics of a language refers to the + meaning or purpose of each piece of syntax.

    +
    +

    This doesn't look so different from the Python version, but there + are a few significant differences:

    + +
      +
    • + The var statement, inside a procedure, is equivalent + to script variables in Snap!. (There are + better, more recently invented, ways to create local variables + in JavaScript, but they look very different and we're trying to + make the code as similar as possible.) +
    • +
    • + JavaScript uses braces { } to mark the extent + of what would be a C-shaped block in Snap!. Although + JavaScript programmers generally indent code more or less the + same way Python programmers do, that's just to make it + more readable to people; the indentation is ignored by JavaScript. + Within the braces, statements are separated by semicolons (;). + (In JavaScript, semicolons go between statements: + {st;st;st}, but in C, an otherwise similar language, + they go after statements: {st;st;st;}. + This is the sort of thing that drives students of text languages + crazy. It's one of the advantages of block-based languages such as + Snap!.) +
    • +
    • + JavaScript uses the name "function" to describe all procedures, + including what Snap! calls "commands," the ones that + don't report a value. +
    • +
    • + Just as in Python, you can't have a + space inside a variable name. Instead, JavaScript programmers often use + "camel case," so called because the capital letters in + the middle of a variable name are supposed to look like + the humps of a camel. +
    • +
    • + JavaScript has the same terrible = notation for + Snap!'s set as Python does. + But instead of using == to test whether two + values are equal, JavaScript has two ways to do that: + == and ===. (That looks like a joke, + but it isn't.) JavaScript programmers + often get confused about which is which. (The one with three + equal signs is similar to the is identical to + block in Snap!.) +
    • +
    + +

    You can see that there are things to learn about notation (syntax, which is the text-language equivalent of block colors and shapes). But you would be able to learn the details of one of these other languages in a few focused days and then program in that language, too.

    + +

    Snap! Primitives in Other Languages

    +

    + Central programming language features having to do with flow of control + (Control), + data management + (Variables + and Lists), + and computation + (Operators and + a few Sensing blocks) + have direct equivalents in most languages. Here are a few examples:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                Snap!            PythonJavaScript
    <code>for</code> block
    for i in range (1, 11):
    +    action()
    for (i=1; i <= 10; i++) {
    +    action()
    +}
    <code>repeat until</code> block
    while (not condition):
    +    action()
    while (not condition) {
    +    action()
    +}
    <code>if/else</code> block
    if condition:
    +    action1()
    +else:
    +    action2()
    if (condition) {
    +    action1()
    +} else {
    +    action2()
    +}
    <code>if/else</code> reporter block
    yes if condition else no
    (condition ? yes : no)
    <code>report</code> block
    return value
    return value
    <code>stop this block</code> block
    return
    return
    <code>function ()</code> block in a gray ring
    lambda x : some_function(x)
    function (x) {
    +    return someFunction(x)
    +}
      or +
    (x) => someFunction(x)
    <code>a times b</code> block
    a * b
    a * b
    <code>a to the power b</code> block
    a ** b
    a ** b
    <code>a and b</code> block
    a and b
    a && b
    <code>join (hello) (world)</code> block
    " ".join(["hello","world"])
      or
    "hello " + "world"
    "hello".concat(" ","world")
      or
    "hello " + "world"
    <code>set (foo) to (87)</code> block
    foo = 87
    foo = 87
    <code>change (foo) by (5)</code> block
    foo += 5
    foo += 5
    <code>list (John) (Paul) (George) (Ringo)</code> block
    ["John", "Paul", "George", "Ringo"]
    ["John", "Paul", "George", "Ringo"]
    <code>item (1) of (value)</code> block
    value[0]
    value[0]
    <code>all but first of (value)</code> block
    value[1:]
    value.slice(1)
    <code>map (some function) over (value)</code> block
    list(map(some_function, value))
    +   or
    [some_function(x) for x in value]
    value.map(someFunction)
    <code>for each (item) of (value): action(item)</code> block
    for item in value:
    +    action(item)
    value.forEach(action)
    + +

    This is just a small sample of the number of primitive commands + and functions in any programming language. Luckily, you don't have + to memorize them; you can do a web search for "javascript + list item," for example, to learn any particular one as you need + it.

    + +

    By the way, look at the Python join in the table. + It has the very nice feature of allowing you to choose a separator + to go between the joined strings:

    + +
    >>> " ".join(["John", "Paul", "George", "Ringo"])
    +'John Paul George Ringo'
    +>>> ",".join(["John", "Paul", "George", "Ringo"])
    +'John,Paul,George,Ringo'
    + +

    In the first interaction, the string " " provides + the separator; in the second, the string "," does. + That's an elegant way to extend the idea of joining strings, + avoiding the need to put spaces in the input strings. + (You could also use an empty string to get the exact effect of + the join block in Snap!.)

    + +
    + On the other hand, look at the Python version of map. + Why do you have to wrap a list(...) + around the call to map? It's because Guido van + Rossum, the designer of Python, hates higher order functions, + so when his users insisted on having them, he made it as + painful as possible to use them. Python's map + doesn't return a list; it returns this strange other thing that + you have to convert to a list. (He wants you to use + the for x in notation instead.) Similarly, he + hates anonymous procedures (Snap! gray rings), and + so when his users insisted, he grudgingly allowed + anonymous reporters that fit on one line, + but not longer reporters or any anonymous command scripts. + Python could be a really usable language if he didn't have + his head wedged on these issues. +
    + +

    But look at the Python equivalent of for. Why + does range(1,11) mean "the numbers from 1 to 10"? + The idea is that you're using those numbers to select items + from a list, but instead of numbering the items, Python numbers + the spaces between items, just as when you're using a + word processor it displays the cursor as a vertical line + between two letters. So range(1,11) means "the + items to the right of gap number 1 and to the left of gap + number 11." You can learn to think that way, but it's not + obvious to a beginner. (It's a little more intuitive if you + start at position 0, before the beginning of the list; + range(0,5) selects five items + from a list, and you can abbreviate it as range(5).)

    + +

    What do you think about using + to join strings? + It's meant as an analogy with arithmetic; you are "adding" one + string to another. Using the same symbol to mean two different + things in different contexts is called "overloading." It's not + too bad in Python, which is very strict about the distinction + between a number and a string of digits. (2+"3" + gives an error message.) But JavaScript, like + Snap!, will automatically convert a number into a + string of digits if necessary, so 2+"3" is "23" + even though 2+3 is 5. (The automatic conversion + isn't a problem in Snap! because Snap! + doesn't overload the + operator.)

    + +

    The other block categories, the ones having to do with graphics + or sound, don't really have analogs in other languages. Instead, + just as Snap! has libraries, other languages also have + libraries to provide such capabilities. For example, if you want + JavaScript equivalents to the turtle graphics blocks + (move (n) steps, etc.), you start in your search + engine; "JavaScript turtle graphics" will get you to + https://github.com/bjpop/js-turtle + from which you can download the file "turtle.js" to include with + your own JavaScript program. (On the other hand, because + the main purpose of JavaScript is writing programs that will be + run inside a browser window, it does have built-in support for + the sort of graphics you see in typical browser windows: + scrolling text boxes, form-filling, checkboxes, etc.)

    + +

    Libraries are a little easier in Python because there's a + central repository of them. So you can draw a square this way:

    + +
    from turtle import *
    +
    +pendown()
    +for i in range (4):
    +    forward(100)
    +    right(90)
    +
    + + +
    +

    How Can You Learn These Similar Languages?

    + + + I didn't do any of this. W3schools is a little controversial. + Some people swear by them; others say they're full of inaccuracies. + I don't know enough to have an opinion. But, anyway, kids know + how to learn stuff; you search the Web, or you get a book from + the library. Or you take APCSA next year. +
    + +

    Non-Sequential Languages

    + +

    In the early days, all programming languages were sequential, + because that's how computer hardware works, and higher level + languages were seen as a convenient abbreviation for machine + language, rather than as a source of abstraction. Since then, + several types of programming language based abstraction + ("programming paradigms") have been invented. + Most modern languages have some aspects of most of these, + but in this section you'll learn about languages that are + entirely based on one particular paradigm. + It's worthwhile to learn such a language because it will + immerse you in how things are done in that paradigm, even + if in real life you end up programming in a mixed-paradigm + language such as Snap!, Python, or JavaScript.

    + +

    Functional Programming in Haskell

    + +

    Imagine if Snap! had only reporters and predicates, with + no command blocks. To perform a computation, you'd build up an + expression in the scripting area, then click on it to see the result + in a speech balloon. You could make script variables, but you'd give + them a value at the time you create them, and you couldn't then + change the value. That would be a functional + programming language.

    + +

    Here's the same binary search algorithm shown above, written in + Haskell, a purely functional language:

    + +
    find :: Ord a => Array Int a -> a -> Maybe Int
    +find arr x = uncurry (search arr x) (bounds arr)
    +
    +search :: Ord a => Array Int a -> a -> Int -> Int -> Maybe Int
    +search arr x lo hi
    +  | hi - lo + 1 == 0 = Nothing
    +  | x == el = Just mid
    +  | x > el = search arr x (mid+1) hi    -- eliminate half the list
    +  | otherwise = search arr x lo (mid-1)
    +  where mid = (hi + lo) `div` 2         -- find the middle word
    +        el = arr ! mid
    +

    Source: exercism.io, CC-BY-SA

    + +

    This looks very different from the other programs you've seen, + but don't throw up your hands in despair. You're not + expected to be able to learn to program in Haskell in just a few + days, but you can read this example with some help. + Start with the fourth line, search arr x lo hi; + it's like the hat block that begins a Snap! procedure, + in this case a search procedure with four inputs.

    + +

    In search you'll see functional programming + making a difference in the programming style. The Snap! + version of the program is organized as a repeat until + loop, in which the values of the variables low, + high, current index, and + current item are changed on every repetition. If you're + not allowed to change variables' values, what can you do instead?

    + +

    The answer is that search calls itself recursively, + in the lines +

      | x > el = search arr x (mid+1) hi
    +  | otherwise = search arr x lo (mid-1)
    + In the recursive calls, either + lo or hi has a different value. This may seem + like a quibble. Isn't that the same as changing the value? No, it + isn't. The recursive call has its own local variables with + the same names as the outer call. You can see that this matters in a + case in which two recursive calls are combined, as in this program + to calculate Fibonacci numbers:

    + +

    If you try to trace through computing fib 4 on the + assumption that there's a single variable n shared by + all the recursive calls, you'll get the wrong answer.

    + +

    The where in the last two lines of the program + is how Haskell creates script variables and gives them their + (unchanging) values.

    + +

    The four lines that start with vertical + bars (|) are like a set of nested + if/else blocks: If hi is + one less than lo, return nothing. If the value you're + looking for is equal to item mid of + arr, return the index mid. (This + version of binary search returns the position of the value in + the list, if any, instead of just True.) If the + value you want is more than the value at the midpoint, search + from the midpoint to the end of the list. Otherwise, search + from the beginning of the list to the midpoint.

    + +
    + Read MoreCould you tell me more about functional programming? +
    +

    The two lines with Ord a and so on are type + declarations. Such declarations aren't a necessary part of a + functional language, but the main functional languages do use them. + The "a" on those lines is the name of a data type that's being created + in each declaration. Find and search are of + type "function," but not any old function. Find is of + type "function that takes as inputs an array (like a Snap! + list) of values of type + a, which has to be an Ordered type (because binary + search doesn't make sense otherwise), and a single value + of type a, and returns either an integer or nothing at + all." Looking at this another way, each of those lines creates an + abstract data type. (The name a is local to + each function.)

    + +

     

    + +

    Find is the main procedure; search + is a helper function. Note that find takes two + inputs, arr for the array and x for + the value to be found. Search, though, takes + four inputs: arr, x, + lo for the lowest array index to examine, and + hi for the highest index. So how can + find say (search arr x), calling + search with only two inputs?

    + +

    This is part of what it means to take function-as-data + seriously. When you call any Haskell function with fewer + inputs than it expects, it returns a function of + the remaining inputs, sort of as if when you defined
    + search reporter block with four inputs: arr, x, lo, hi
    + you automatically also got this one:
    + search reporter block with two inputs: arr, x;
+				reporting an anonymous function (gray ring) that takes
+				two inputs named lo and hi, and calls the four-input search
+				with arr, x, lo, and hi
    + and similarly for one-input and three-input versions. + Turning a function into a function with fewer inputs is + called currying it, named after Haskell Curry, a + mathematician who contributed to the early development + of lambda calculus, the mathematical basis for functional + programming. So the call to uncurry turns + the two-input function back into a four-input function by + supplying the missing two inputs, namely + (bounds arr), a function call that + reports the lowest and + highest indices of the array, which will be 0 and + the array length minus 1.

    +
    +
    + +

    Even if you're convinced that functional programming is a + good idea (which it is, because it avoids the kind of bug in + which two parts of the program are using the same variable for + different purposes, and because functional code turns out to + be the easiest to parallelize for multi-processor machines), + why would you choose a language that forces you to + program in that style? Well, many people don't. You can, if + you're disciplined about it, program functionally in any + language that's functional enough to include higher + order functions, which are an important benefit of functional + programming. (You did something like this in the Tic-Tac-Toe + project, not in the part that displays moves on the stage, but + in the part that computes the best move for the computer. + That computation is one function calling another: next move for
+		computer calls winning square for player, which calls winning triple for player, which calls status of all winning triples, which calls status of
+		triple.) But a purely functional + language helps eliminate program bugs, which is especially + important when a team of programmers work together on the same + program. And compilers for functional languages can take + advantage of the constraints of functional programming to + generate very efficient programs. In any case, + learning a purely functional language ensures that + you discover every aspect of functional programming. + +

    + +

    Object Oriented Programming (OOP) in Smalltalk

    + +

    Imagine if in Snap! you could make only sprite-local + procedures and variables, not global ones. Imagine also that + everything in the language were like sprites in that + way. So, for example, imagine that the number 3 had its own + procedures—its own + and so on. Something + that has its own local procedures (called methods) + and its own local variables (often called fields, + depending on the language) is called an object.

    + +

    It would be unusable if you actually had to write a + + method for 3 and a different one for 4. + But think about making clones of a sprite, as you did in the + Tic-Tac-Toe project. Each clone inherits the methods + and some other attributes from its parent sprite. Similarly, + 3 and 4 are instances of + the class (type of object) Integer, which in turn + inherits from the class Number. You can think of + an object class as a souped-up abstract data type with methods + other than just its selectors.

    + +

    So, what happens when you say 3 + 4? You are + sending the message + 4 to the object + 3. (In Snap!, the broadcast + block sends a message to all objects, and the tell + and ask blocks send a message to a specific object.) + The message + 4 consists of a keyword, + +, along with an input, 4.

    + +

    These days, most programming languages are sort of + object oriented, just as most sort of support functional + programming. For example, in the translation table above, + the translation of the map block to JavaScript + is value.map(someFunction). Map + takes two inputs, a function and a list. Python expresses + that idea as a two-input function, map(some_function,value). + Why does JavaScript put one of the inputs in front of the + function name? The reason is that JavaScript's map isn't a + global procedure; it's the keyword of a message that + you can send to a list. Their message-passing syntax is + object.keyword(inputs).

    + +

    But most languages don't go so far as to treat numbers + as objects. In most languages, including Snap!, + + is a global function that takes two numbers as + inputs. The only widely known language that's truly + object oriented, in which everything is an object, + is Smalltalk, the language that introduced object oriented + programming to the world.

    + +

    Here's the binary search program in Smalltalk:

    + +
    SequenceableCollection >> binaryFindIndexOf: aNumber left: leftIndex right: rightIndex
    +      | middle |
    +      leftIndex = rightIndex ifTrue: [ ^ 0 ].
    +      middle := (rightIndex + leftIndex) // 2.  "find the middle word"
    +      ^ (self at: middle) = aNumber
    +            ifTrue: [ middle ]
    +            ifFalse: [
    +                (self at: middle) > aNumber     "eliminate half the list"
    +                    ifTrue: [ self binaryFindIndex: aNumber left: leftIndex right: middle - 1 ]
    +                    ifFalse: [ self binaryFindIndex: aNumber left: middle + 1 right: rightIndex ]
    +            ]
    +

    Source: stackoverflow.com, CC BY-SA, and Bernat Romagosa

    + +

    The first line of this program says that it is adding a new + method to the class SequenceableCollection, which + is a parent class of arrays, lists, and other kinds of + sequences of items. The corresponding message has three + keywords, binaryFindIndexOf:, left:, and + right:. This is similar to the way Snap! + blocks can have title text mixed with input slots. The inputs + to this method are named aNumber (a Smalltalk convention + that helps make the code self-documenting because we know what + kind of object it expects), leftIndex, and + rightIndex. (Shouldn't there be an input for the + collection in + which the method will search? No, because that collection is an + object, and binaryFindIndexOf is a method of the + collection.)

    + +

    The vertical bars in the second line are the Smalltalk syntax + for script variables. Another noteworthy piece of + syntax is that Smalltalk uses square brackets [ ] + the way Snap! uses gray rings, surrounding a piece of + code that can be input to a message. Smalltalk sensibly uses + = to mean the equality test; its equivalent to + set is the two-character sequence :=. + (Smalltalk was developed long before Unicode; if they were + designing it today they'd probably use . + The hat (^) is like report. + The double slash // is division with the result + rounded to an integer.

    + +

    The Boolean values True and False are, of course, objects; + they accept messages with keywords ifTrue: and + ifFalse:, each of which takes a code block (in + square brackets, in this program) as input. So there's no + need for an explicit if procedure.

    + +

    The name self refers to the object that is carrying + out the method, like + or in + Snap!. The message at: middle, sent to a + collection, means the same as item middle of + collection in Snap!. The rest of the program should + now make sense.

    + +
    + Read MoreCould you tell me more about + object oriented programming? +
    +

    Object oriented programming with message passing + does a great job with functions of + one input, such as asking a list for its length. It's a little more + awkward for a function like +, whose two inputs really + play mathematically similar roles. + Saying that 3 is the actor and + 4 is just an input feels peculiar. Some languages try + to overcome this issue by using generic functions instead + of message passing. That means that you could define functions + sum(integer,integer), sum(integer,float), + and so on, so that all the inputs help determine which method is + used. When you call a function, the language looks for the best + fit between the methods you've defined and the classes (types) of + the inputs.

    + +

    Think about Python's " ".join(["hello","world"]) + notation. This is the same object.method(inputs) + syntax that JavaScript uses, and it works well. But it seems a + little strange that what you're supposed to think of as the active + object is the delimiter character, rather than the meaningful + strings you're combining. Compare that with JavaScript's + "hello".concat(" ","world"), which makes the first + string the actor and other strings, including delimiters, the + inputs. That seems more Smalltalk-like.

    + +

     

    + +

    Smalltalk is a class/instance language. That means + that there's a special kind of object called a class + that contains all the methods for any object of that class. + For example, Integer is a class, and 3 + is an instance. The inheritance of methods from parents + happens in the classes, not the instances.

    + +

    As you know, Snap! takes a different approach. + Every object combines the features of classes and instances; + it can have methods and can inherit, like a class, but it's + a specific value, like an instance. (For example, sprites + can have methods, and can inherit them, but a sprite can be + shown on the stage and move around, like an instance.) This + approach is called prototyping OOP.

    + +

    Many languages that purport to use prototyping (JavaScript, + for example) have a special kind of object called + a "prototype," and that's the kind of object that can have + methods and a parent. If you're asking yourself "How does + that differ from a class?" you're right. Snap!'s + prototyping is both simpler and more flexible.

    + +
    +
    + +

    Why would you use an object oriented language? Programmers' + opinions on this question have changed dramatically over time. When + Alan Kay and his team at + Xerox PARC + introduced Smalltalk, very few people got the point. But today, there + are many programmers who insist that using anything other + than object oriented programming is professional malpractice. (They + don't use Smalltalk, though; many use Java, the language of the + College Board AP Computer Science A course.) The main thing that's + made OOP so popular is information hiding, which means that + one object can't directly examine another object's variables or + call its methods, but must + instead send the target object a message that it accepts from + other kinds of objects ("public messages").

    + +

    Ironically, information hiding isn't a necessary part of OOP. + In Smalltalk, any message an object understands can be sent to + it by other objects. (There are no private methods.) + In a language for learning, such as Smalltalk in + its early days and Snap!, information hiding isn't + important. Programs are small, and they have just one or two authors. + (The people who talk about malpractice are thinking about teams of 500 + programmers, and all the ways they can step on each others' feet + unless the objects each one programs are protected from each other.) + That's why Snap!, like Smalltalk, allows an object to call + any method of another object, not just a few for which the + other object publishes messages. Snap!'s developers were + more interested in one of Smalltalk's central ideas: + simulation.

    + +

    In pre-OOP programming, there's one program running all the time, + and it's in charge of all the necessary computations. That's fine if + you're computing a function, for example, but some programs are + meant to model the behavior of a complex system with many independent + actors, such as the disease simulation project in this unit. The + simple model used in that project has only one object type, people. + A better model would have different kinds of people (for example, + those who do and those who don't follow medical advice about wearing + masks) and would model the disease itself, such as its ability to + mutate. OOP is great at this kind of simulation, because each object + is responsible for its own behavior. (Scratch, from which Snap! + inherited the idea of sprites, was originally implemented in + Smalltalk, whose influence is seen in such details as multi-keyword + block names, as well as in the organization of a program as scripts + that belong to specific sprites, with no central program.)

    + +

    Declarative Programming in Prolog

    + +

    This section isn't going to start with "Imagine if Snap!..." + Declarative programming is a very, very different approach. What you + have to imagine is that programs don't have algorithms!

    + +

    Instead, a program consists of facts and rules + that you are teaching the computer. One of the standard examples is + about family trees. "Brian's mother is Tessa" is a fact, a specific + piece of information. + +

    mother('Brian','Tessa').
    + + Rules are more general: "If person A's mother is person B, + and person B's mother is person C, then person A's grandmother + is person C." Here's how that would look in Prolog, + the best-known declarative language:

    + +
    grandmother(A,C) :-
    +    mother(A,B),
    +    mother(B,C).
    + +

    What about the mother of someone's father? Shouldn't that have + to be in the rule, too? The answer is that you can have as many + rules as you want about grandmotherhood:

    + +
    grandmother(A,C) :-
    +    father(A,B),
    +    mother(B,C).
    + +

    Once you've taught the computer some rules and facts, you + can ask questions, such as "Who is Brian's grandmother?":

    + +
    ?- grandmother('Brian', X)
    + +

    A very important difference between declarative programming + (also called logic programming) + and the other paradigms you've seen is that a question may have + more than one answer! This is very different from a function, + which can only report one value. Prolog doesn't just pick one + answer to show you; it shows all the answers it can figure out + from the information it has (one at a time). Here's an example:

    + +
    ?- append(X,Y,[a,b,c,d]).
    +X = [],
    +Y = [a, b, c, d] ;
    +X = [a],
    +Y = [b, c, d] ;
    +X = [a, b],
    +Y = [c, d] ;
    +X = [a, b, c],
    +Y = [d] ;
    +X = [a, b, c, d],
    +Y = [] ;
    +false.
    + +

    The user has asked "what two lists can be appended together + to get the list [a,b,c,d]?" There are five possible + pairs of lists that satisfy the condition. Prolog prints the + first answer (shown in yellow above), then waits for the user to type + the space key or semicolon, then displays the next answer, and + so on. When the user asks for a sixth answer, the result is + "false," which means that Prolog can't find any more values for + X and Y that make the query true. (That + doesn't mean it's proven false; for example, if you teach Prolog + about your family tree and then ask questions about someone else's + family, Prolog won't find any information, but that doesn't mean + the other person really doesn't have any relatives.)

    + +

    Wow! Snap! has an + append block + function; you can ask it questions such as + "what do I get if I append the list [a,b] and the list + [c,d]?" But you can't "run it backward," asking + questions such as "What must I append to [a,b] in order + to get [a,b,c,d]?" let alone "What two lists can I + append to get [a,b,c,d]?" But Prolog's append + isn't a function of two lists; it's a relation (you can + think of it a predicate function, although you shouldn't forget + that it's not really a function, running an algorithm, at all) + among three lists, which is + True if the result of appending the first two inputs is the third + input. There's no special magic in append; if it + weren't predefined in Prolog, you could + define it this way: + +

    append([],Z,Z).
    +
    +append([A|X],Y,[A|Z]) :- append(X,Y,Z).
    + +

    The notation + [A|B] represents a nonempty list whose first item is + A and whose all-but-first is B. + The first rule says that if you append an empty list and any + list Z, you get Z. The second rule says + that if the first list isn't empty, then the first item + of the result must be the first item of the first list, and the + rest of the result must be the result of appending the rest of + the first list and the second list.

    + +

    Okay, time for binary search in Prolog:

    + +
    contains(List, Value) :- even_division(_, [Value|_], List).
    +
    +contains(List, Value) :-                          % eliminate first half of list
    +    even_division(_, [Center|SecondHalf], List),
    +    Center < Value, SecondHalf \= [],
    +    contains(SecondHalf, Value).
    +
    +contains(List, Value) :-                          % eliminate second half of list
    +    even_division(FirstHalf, [Center|_], List),
    +    Center > Value, FirstHalf \= [],
    +    contains(FirstHalf, Value).
    +
    +even_division(First, Second, Xs) :-               % find the middle word
    +    append(First, Second, Xs),
    +    length(First,F),
    +    length(Second,S),
    +    S >= F, S-F =< 1.
    +

    Source: colby.edu

    + +

    The first thing to say about this program is that it's not really a + good model of how to program in Prolog. The helper rule + even_division wants to divide a list into two equal-size + pieces; it ends up dividing the list into two pieces every + possible way (like the append example earlier), and + then checks each of those divisions to find one whose two pieces are + the same length. If you really wanted to do a binary search in + Prolog, you'd do it by using a more complicated data structure that + comes pre-divided into equal size pieces. But for the purpose of + this page, comparing languages, it's best to use the same + structure in all the sample programs.

    + +

    The + underscore character _, used by itself, means that you + don't care what value goes in that slot in the program. (Underscores + can also be used as part of a variable name or a relation name, as in the + relation even_division.)

    + +

    So the first rule

    + +
    contains(List, Value) :- even_division(_, [Value|_], List).
    + +

    means that the given Value is in the List + if it happens to be the middle item of the list—that is, + List can be divided into two equal parts, you don't + care what's in the first part, and the second part has + Value as its first item, followed by some values you + don't care about.

    + +

    The next rule handles the case in which the value is larger + than the middle item of the list. It says that List + contains Value provided that the middle item + Center is less than Value, the second + half of List has items other than just Center, + and those other items (SecondHalf) include the desired + Value. (The requirement that SecondHalf + isn't an empty list is there to prevent infinite loops in which + the program keeps dividing an empty list into two (equal size) + empty lists.)

    + +

    Similarly, the third rule handles the case in which the value + is smaller than Center.

    + +

    Why isn't there a rule saying to report False if the value + isn't found? This is the mind-stretching part of declarative + programming. A rule isn't a function, and it doesn't report a + value. That would be an algorithm! A rule doesn't do + anything; it's just another kind of data. If Prolog can't + match the question you ask against any combination of facts and + rules, then you just don't get an answer at all. That's not + considered an error.

    + +

    The use of even_division in this program is an + attempt to have it work the way binary search works, by dividing + the list in half at each step. But if you just want to know if + a value is in a list and aren't worried about efficiency, the + entire program could be replaced by one rule:

    + +
    contains(List, Value) :- append(_, [Value|_], List).
    + +

    This says that the list can be divided into two pieces + (the first of which might be empty; you don't care what's + in it), such that the desired value is the first item in + the second piece of the list. That example should give you + some feeling for the power of the declarative programming notation.

    + +

    How does a Prolog program actually work? If there are no + algorithms, only data, how can any matching of queries to + things in its database happen? The answer is that the language + itself implements a single, universal algorithm, called + resolution, that will always find every answer to + a question you ask that can be deduced from the database, + provided that it doesn't get caught in an infinite loop. + (If resolution could guarantee the impossibility of + infinite loops, it would solve the Halting Problem, which + you know can't be done.)

    + +
    + Read MoreCould you tell me more about + declarative programming? +
    +

    The Prolog database consists of facts and rules. The + difference is that facts don't contain variables. So, + given a query such as mother('Brian',X), it's + pretty easy to see whether that matches a fact such as + + + + + + + +
    father('Brian','Len') Nope, father≠mother
    mother('Bob','Tessa') Nope, 'Bob'≠'Brian'
    mother('Brian','Tessa') Yes, provided that X='Tessa'
    + The only subtlety is that if the same variable is used twice + in a query, it has to match the same text every time, so that + someone who says mother(X,X), presumably wanting + to find someone who's their own mother, doesn't match every + fact about mothers in the database.

    + +

    Rules are more complicated, because both the query and + the rule can have variables. Consider the query + append(X,Y,[a,b,c,d]) that you saw earlier. + If the same variable name is used twice in the same query, + or in the same rule, that name must match the same + value each time it's used. But it's okay for a user to use + a variable name in a query that happens to be the same as + a name used in a rule; they don't have to have the same + value. It's like using the same name in a script + variables block in two different scripts; they're + different variables despite the coincidence of the names.

    + +

    So, when trying to match a query against a rule, the first + step is to systematically rename all the variables + in the rule, with unique names. For example, the first time + Prolog compares a query with the rule +

    append([],Z,Z).
    + it (temporarily) changes the rule to something like +
    append([],Z.1,Z.1).
    + The next time it compares something to that rule, it'll + change it to +
    append([],Z.2,Z.2).
    + And so on.

    + +

    Okay, compare the append query above with + this first rule: +

    append(X,Y,[a,b,c,d]).
    +append([],Z.1,Z.1).
    + This results in the following pairings: +
    X = []
    +Y = Z.1
    +Z.1 = [a,b,c,d]
    + Combining the information in the last two of those + pairings gives Y = [a,b,c,d], so that + gives both of the variables in the query values, + so Prolog gives the first answer.

    + +

    That was a simple rule, in that its conclusion + always holds. The other append rule + includes a condition that must be true in order for + the rule to apply. After renaming, that rule says +

    append([A.2|X.2],Y.2,[A.2|Z.2]) :- append(X.2,Y.2,Z.2).
    + The resolution rule for rules with conditions is + that first we try to match the query with the + conclusion of the rule, then if that works, we + take the condition of the rule as a new query. In + this case, we are comparing +
    append(X,Y,[a,b,c,d]).
    +append([A.2|X.2],Y.2,[A.2|Z.2]).
    + The technical name for matching two expressions that + can both contain variables is unification. + Figuring out exactly how to get it right is hard, + but luckily, it's been done, so you don't have to. + Here are the results: +
    X = [A.2|X.2]
    +Y = Y.2
    +[A.2|Z.2] = [a,b,c,d]
    + But now think about what the [...|...] notation means. + That last match can be expressed as the two matches +
    A.2 = a
    +Z.2 = [b,c,d]
    + This isn't enough to give us values for X + and Y in the original query with no + variables in the values. But knowing that A.2 + must have the value a is a big step + forward. It tells us that X is a list + whose first item is a.

    + +

    Now, remembering all the pairings so far, + we start again with the query append(X.2,Y.2,Z.2). + Compare that with the first append rule: +

    append(X.2,Y.2,Z.2).
    +append([],Z.3,Z.3).
    + From this we learn +
    X.2 = []
    +Y.2 = Z.3
    +Z.2 = Z.3
    + This might be dizzy-making for people, but luckily + computers don't get dizzy. Here again are all the + matches Prolog has found for this second answer: +
    X = [A.2|X.2]
    +Y = Y.2
    +[A.2|Z.2] = [a,b,c,d]
    +A.2 = a
    +Z.2 = [b,c,d]
    +X.2 = []
    +Y.2 = Z.3
    +Z.2 = Z.3
    + You can trace through these equations to learn that +
    X = [A.2|X.2] = [a|[]] = [a]
    +Y = Y.2 = Z.3 = Z.2 = [b,c,d]
    + and that's the second answer. We'll stop here, but + if you want you can match the query +
    append(X.2,Y.2,Z.2)
    + against the second rule, and the result of that + against the first rule, and so on.

    +
    +
    + +

    Why would you program in a declarative language? Some + problems just lend themselves to a database-ish frame of + mind. Think about family trees again. There may be gaps + in what you know about your ancestors; an algorithm that + expects everyone in the database to have exactly two parents + in the database wouldn't work if there's missing information. + Similarly, if you have two mothers or two fathers, a situation + that's more common these days than in the past, Prolog won't + mind. You just tell it two facts such as + mother('me','mom1') and mother('me','mom2'). + Also, nothing beats declarative programming for situations in + which a problem can have more than one answer. Think about + a quadratic equation with two solutions. In ordinary programming, + you can write a function that reports a list of two numbers, but + a list isn't a number, and can't take part in further numeric + computations. It's better if you get two separate answers, each + of which is a number.

    + +

    The Morals of the Story

    + +

    So, one overall moral of this story is that if you have the urge to + learn more programming languages, you'll be intellectually better off + learning Haskell, Smalltalk, or Prolog, rather than learning a bunch + of languages that are pretty much all the same, such as JavaScript, + Python, C, Java, and so on. (If you want a programming job this + summer, though, you might need to learn the language a potential + employer wants to use.)

    + +

    And, by the way, don't think that because this page is telling you + about other languages it means you've learned all there is to know + about Snap!. For example, read Sections VIII (OOP + with Procedures) and X (Continuations) in the + Snap! + Reference Manual.

    + +

    But also, bear in mind that learning computer science doesn't + mean learning a lot of programming languages. If you study CS + at the university level, you won't be taking classes named after + programming languages; they'll have names like "Algorithms and + Data Structures," "Graphics," "Operating Systems," "User Interface + Design," "Compilers," "Recursive Function Theory," and so on. + Maybe instead of learning another language, you should work your + way through + Structure + and Interpretation of Computer Programs, + the course that separates the wizards from the muggles.

    + + diff --git a/cur/programming/6-computers/1-abstraction/04-software-libraries.html b/cur/programming/6-computers/1-abstraction/04-software-libraries.html index 3f300908dc..69cc006b49 100644 --- a/cur/programming/6-computers/1-abstraction/04-software-libraries.html +++ b/cur/programming/6-computers/1-abstraction/04-software-libraries.html @@ -44,7 +44,7 @@

    Libraries in Snap!

    Do we need all this commented out text? --MF, 6/12/20

    - You've used libraries in Snap!. For example, when you imported the "Bar Charts" library in Unit 5 Lab 3 Page 4: Analyzing Data. diff --git a/cur/programming/7-recursion/2-projects/1-triangle-fractal.html b/cur/programming/7-recursion/2-projects/1-triangle-fractal.html index 41016ab10e..d99cb4276d 100644 --- a/cur/programming/7-recursion/2-projects/1-triangle-fractal.html +++ b/cur/programming/7-recursion/2-projects/1-triangle-fractal.html @@ -21,7 +21,7 @@

    Triangle Fractal

    1. Open your project "U3L1-FractalArt"; save it as "U7L2-TriangleFractal".
    2. -
    3. Run nested triange, size: (175). Then look inside the block and remind yourself and your partner how it works.
    4. +
    5. Run nested triangle, size: (175). Then look inside the block and remind yourself and your partner how it works.
    6. Predict how the shape will change if you change the 9 in (size)>(9) to 2 and run the instruction again. Then try it and see if it does what you expect.
      diff --git a/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html b/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html index a1e028272c..89c9573ba4 100644 --- a/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html +++ b/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html @@ -42,7 +42,6 @@

      Listing the Subsets

      subsets(set){if(){report()}else{...; report(append()())}}
    7. -

      From the Snap! file menu, choose "Libraries..." at the bottom, then choose "List Utilities" to load append and other list operations.

    diff --git a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/1-plurals-and-other-recursions.html b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/1-plurals-and-other-recursions.html index 2da6788877..f40c7dad50 100755 --- a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/1-plurals-and-other-recursions.html +++ b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/1-plurals-and-other-recursions.html @@ -34,9 +34,10 @@

    Walking Down a List

    Need to have them download "Words and Sentences" library and update the image. --MF, 6/17/20
    Make an exaggerate block that takes a sentence as input, and reports a sentence in which every number in the input is doubled, "good" is replaced by "great," "bad" is replaced by "terrible," "like" is replaced by "love," and "dislike" is replaced by "hate."

    exaggerate(I ate 6 really good potstickers), reporting I ate 12 really great potstickers

    -

    To do this, use a "wrapper" function that transforms the sentence into a list of words and back again:

    +

    To do this, first import the "Words, sentences" library. Then use a "wrapper" function that transforms the sentence into a list of words and back again:

    exaggerate(sentence){report(list->sentence(exaggerate wordlist(sentence->list(sentence))))}

    What should the helper function do with the other words?
    +

    It's the exaggerate wordlist block that will be recursive.

    You'll also want a helper function exaggerate word that works on a single word, looking for specific words and types to exaggerate.

    diff --git a/cur/programming/CSTA2019/1-solving-word-puzzle.html b/cur/programming/CSTA2019/1-solving-word-puzzle.html index 4fbabd81db..a24499c2a0 100644 --- a/cur/programming/CSTA2019/1-solving-word-puzzle.html +++ b/cur/programming/CSTA2019/1-solving-word-puzzle.html @@ -24,7 +24,7 @@

    Please note, this is a adaptation of the student-facing page and was designe

    - Predicates can also be used with keep items () from 'list input slot' to decide which things to keep. The keep block takes a list and a predicate as input, and it reports a new list keeping only the items from the list that make the predicate true. For example, this expression finds words from the words list whose first letter is v and reports a list of 170 matching words. The blank input slot is where each word in the list goes to decide if it will be kept.
    + Predicates can also be used with keep items () from 'list input slot' to decide which things to keep. The keep block takes a list and a predicate as input, and it reports a new list keeping only the items from the list that make the predicate true. For example, this expression finds words from the words list whose first letter is v and reports a list of 170 matching words. The blank input slot is where each word in the list goes to decide if it will be kept.

    alt/title text needs updates
    keep items such that ((letter(1) of ( )) = (v)) from (words list)

    @@ -80,11 +80,11 @@

    Essential Idea

    Keep is a higher order function; it is a function that takes functions as input. Click for two other examples from BJC.

    - The map 'reporter input slot' over 'list input slot' block applies the input function to each item in the input list and then reports a new list of each original value after being modified by the function. For example...
    + The map 'reporter input slot' over 'list input slot' block applies the input function to each item in the input list and then reports a new list of each original value after being modified by the function. For example...
    map (join( )(s)) over (list {cat, dog, bird}) reporting {cats, dogs, birds}

    - The combine 'list input slot' using () block combines all the elements in the input list using the input operation. For example...
    + The combine 'list input slot' using 'reporter input slot' block combines all the elements in the input list using the input operation. For example...
    combine with (()+()) items of (list {0, 1, 2}) reporting 3

    @@ -98,7 +98,7 @@

    Essential Idea

    You can save your work into the Snap! cloud.
    1. - In the Snap! window, click the Cloud menu (Cloud button), select "Signup...", and follow the instructions.
      + In the Snap! window, click the Cloud menu (Cloud menu button), select "Signup...", and follow the instructions.
      cloud icon
    2. diff --git a/cur/programming/CSTA2019/3-quizzes.html b/cur/programming/CSTA2019/3-quizzes.html index c67c656091..09b90c3ee9 100644 --- a/cur/programming/CSTA2019/3-quizzes.html +++ b/cur/programming/CSTA2019/3-quizzes.html @@ -17,7 +17,7 @@

      Please note, this is a adaptation of the student-facing page and was designe

      On this page, you will develop a quiz app by creating an abstract data type to pair the questions with their answers.

      - You'll use a list to store your quiz items in a variable. You could just put all the questions and their answers in a list like this and then use item () of 'list input slot' to retrieve each question and each answer using its index. + You'll use a list to store your quiz items in a variable. You could just put all the questions and their answers in a list like this and then use item () of 'list input slot' to retrieve each question and each answer using its index.

      set (computer science quiz) to (list (What is the computer science term for looping or repetition?) (iteration) (What is the name for the abstraction in a program that can hold a value?) (variable) (What kind of variable is available only in the part of the program where it is defined?) (local variable))
      That might be ok for the first quiz item (you could use item (1) of (computer science quiz) to get the first question and item (2) of (computer science quiz) to get the first answer), but for a long quiz, you might leave out one answer by accident and then after that, the program will get questions and answers mixed up.

      @@ -70,7 +70,7 @@

      Please note, this is a adaptation of the student-facing page and was designe
      1. Right-click one of the three blocks in the scripting area and select "edit..." to edit its code. The input to the report block will be the value reported when the procedure is called.
      2. -
      3. You will need the list block and/or item(1) of (). Drag the appropriate one(s) into the procedure definition, and then drag the input parameter(s) into the input slots of the list and/or item blocks.
      4. +
      5. You will need the list block and/or item () of 'list input slot'. Drag the appropriate one(s) into the procedure definition, and then drag the input parameter(s) into the input slots of the list and/or item blocks.
      6. Click "OK."
      7. Repeat for the remaining ADT blocks.
      @@ -88,7 +88,7 @@

      Please note, this is a adaptation of the student-facing page and was designe
      Need a hint about selecting a specific item?
      -

      You'll need item () of 'list input slot'

      +

      You'll need item () of 'list input slot'

      Test both the selectors for different items in your list of quiz items, and debug any problems. diff --git a/cur/programming/CSTA2020/quiz-app.html b/cur/programming/CSTA2020/quiz-app.html index 59314c3e6d..7a2f340a51 100644 --- a/cur/programming/CSTA2020/quiz-app.html +++ b/cur/programming/CSTA2020/quiz-app.html @@ -71,7 +71,7 @@

      Building a Quiz App

      Making a New Snap! Project

      1. Open Snap!.
      2. -
      3. Choose "Save" from the Snap! File menu, File button.
      4. +
      5. Choose "Save" from the Snap! File menu, File menu button.
      6. Type the project name.
      7. Click the "Save" button.
      diff --git a/cur/programming/CSTANE2020/click-alonzo.html b/cur/programming/CSTANE2020/click-alonzo.html index b91aaf9a30..6aee1e0eab 100644 --- a/cur/programming/CSTANE2020/click-alonzo.html +++ b/cur/programming/CSTANE2020/click-alonzo.html @@ -142,13 +142,13 @@

      Ending the Game

      if ((ghost effect) = 100) {clear graphic effects, stop all}
    3. - If you want to save your work, open the Snap! File menu (File button) and choose save. You can either save the file to your computer, or if you have a Snap! account, you can save it to the Snap! cloud. + If you want to save your work, open the Snap! File menu (File menu button) and choose save. You can either save the file to your computer, or if you have a Snap! account, you can save it to the Snap! cloud.

      Creating an Account

      - In the Snap! window, click the Cloud menu, Cloud button, select "Signup...", and follow the instructions.
      + In the Snap! window, click the Cloud menu, Cloud menu button, select "Signup...", and follow the instructions.
      cloud icon

      You'll be asked to click a link in your email to verify your account, but you don't have to do that right now.

      -

      You may change your password at any time using the Cloud menu, Cloud button.

      +

      You may change your password at any time using the Cloud menu, Cloud menu button.

    diff --git a/cur/programming/libraries b/cur/programming/libraries new file mode 100644 index 0000000000..26eb680537 --- /dev/null +++ b/cur/programming/libraries @@ -0,0 +1,62 @@ +1-introduction/3-drawing/1-exploring-motion.html: Color families. Click the file menu icon and select "Libraries..." Then, find the "Colors and Crayons" library and click "Import."
    +1-introduction/3-drawing/1-exploring-motion.html: Snap! file menu, highlighting "Libraries..." +1-introduction/3-drawing/1-exploring-motion.html: Import library dialog box with "Colors and Crayons" library highlighted
    +1-introduction/3-drawing/1-exploring-motion.html: In the Pen menu you'll find the set pen to crayon block. Computers can display billions of colors, but unless you have to match the paint on your wall very precisely, finding your way through all those colors may be more trouble than it's worth. The crayon library, just like a box of crayons, gives you a small set of vibrant colors, arranged in families. So if you want a lot of browns in your picture, you could pick a random number between 30 and 39.
    +1-introduction/3-drawing/2-exploring-snap-drawing-motion.html: Gamal: Hey! Gang! Remember we imported that crayon library? Guess what! There's a "World Map" library, too! And it makes "watercolor" maps like this:
    +2-complexity/4-making-computers-do-math/1-mod-operator.html:
  • "U2L4-MathLibrary"Start a New Project called U2L4-MathLibrary
  • +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    Making a Mathematical Library

    +2-complexity/4-making-computers-do-math/2-math-predicates.html:
    In this project, you will create a library (a collection) of math tools that builds on the blocks you created in Lab 3 Page 2: Combining Predicates.
    +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    A software library is a collection of procedures that can be used in programs.

    +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    Using libraries simplifies the development of new programs. When you use procedures that you already know work correctly, you reduce the amount of time you need to spend coding, the number of possible bugs your code can have, and how much of your project you need to test.

    +2-complexity/4-making-computers-do-math/2-math-predicates.html:
    Snap! libraries and Snap! projects are both exported as XML files.
    +2-complexity/4-making-computers-do-math/2-math-predicates.html: Import these blocks into your U2L4-MathLibrary project, test them and resolve any issues, and save. +2-complexity/4-making-computers-do-math/2-math-predicates.html:
  • Open the Snap! project into which you want to import blocks. (In this case, your U2L4-MathLibrary project.)
  • +2-complexity/4-making-computers-do-math/2-math-predicates.html: You are creating a math library. Snap! has libraries for many things, such as one for accessing different parts of words and sentences...
    +2-complexity/4-making-computers-do-math/2-math-predicates.html: Snap! File menu opened with cursor over 'Libraries' +2-complexity/4-making-computers-do-math/2-math-predicates.html: Snap! 'Import library' dialog box highlighting 'Words, sentences' library +2-complexity/4-making-computers-do-math/2-math-predicates.html: Copy and modify the code from your even? predicate to develop an odd? predicate for your library.
    +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    You can create algorithms from scratch or by combining or modifying existing algorithms. When you are thinking of using existing code, you can either use your own code or use code from someone else's library.

    +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    You've now made a small library, and you might want to write a list of instructions for how to use the functions in your library (for example, divisors of takes a positive integer as input and reports a list of numbers). The instructions form an Application Program Interface for the library.

    +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    An application program interface (API) documents what a programmer needs to know about using a library: it's a description of each procedure's purpose, inputs, and outputs (but not its algorithms).

    +2-complexity/4-making-computers-do-math/2-math-predicates.html:

    A common kind of API is a web API in which the library exists on someone else's computer. For example, the Google Maps API describes how to embed a Google Map on your own website.

    +2-complexity/4-making-computers-do-math/3-other-math-reporters.html:
  • Open your U2L4-MathLibrary project if it isn't open already.
  • +2-complexity/4-making-computers-do-math/3-other-math-reporters.html:

    Average of list and sum of list are procedures that you'll need repeatedly, so after a while, you just know how to write them, or you'll put them in a library, and you won't have to reinvent them each time. Finding the maximum or minimum value in a list and checking for divisibility are also commonly needed algorithms.

    +2-complexity/5-copyrights/5-drm.html:
    Temporary exemptions to the anti-circumvention part of the DMCA can be made by the Librarian of Congress for a three-year period (a surprising choice, since the Library of Congress previously wasn't involved in judging copyright issues), but any such exemption must be renewed by the Librarian every three years. Most such exemptions are made for technical reasons (e.g., to allow one piece of equipment to work with another piece of equipment from a different manufacturer), but there was great excitement in 2010 when the Librarian of Congress allowed people to jailbreak their cell phones.
    +3-lists/1-abstraction/4-brick-wall.html: You might want to use the odd? predicate from your U2L4-MathLibrary. You learned about exporting and importing blocks on Unit 2 Lab 3 Page 1: What's a Predicate? +3-lists/1-abstraction/6-debugging-recap.html: The "Unused blocks..." option in the Snap! File menu will eliminate blocks you no longer need. This is often useful when you've loaded a library but you only need one or two blocks from the library. +3-lists/2-contact-list/4-looking-up-data.html: Make a block to sort the contact list. To do the actual sorting, you can load the "List utilities" library. It has a block +4-internet/2-cybersecurity/2-caesar-cipher.html:
  • If you want to use Unicode, you'll probably want to build or import a block like is between? from your U2L4-MathLibrary project to check which Unicode values are capital letters. (You learned about exporting and importing blocks on Unit 2 Lab 4 Page 2: Making a Mathematical Library.)
  • +4-internet/4-representation-compression/3-representing-numbers.html:
    You can use bignums in any Snap! project by importing the "Infinite precision integers, exact rationals, complex" library.

    You learned to import libraries on the Libraries page.

    They did not. --MF, 6/13/19
    +5-algorithms/3-turning-data-information/1-health-data.html: Looking at clusters in the data can help you gain insight and knowledge. Do some research online or in the library to help you answer the following: +5-algorithms/3-turning-data-information/4-filtering-data.html: You can use the pipe function from the "Bar Charts" library to work through your data analysis one function at at time:
    +5-algorithms/3-turning-data-information/4-filtering-data.html:

    You learned about loading libraries and exporting/importing blocks on Unit 2 Lab 4 Page 2: Making a Mathematical Library.

    +5-algorithms/3-turning-data-information/4-filtering-data.html:
  • Load the "Bar Charts" library from the "Libraries..." option in the Snap! File menu (File button).
  • +6-computers/1-abstraction/01-abstraction.html: diagram of computer abstraction hierarchy showing three levels of decreasing abstraction: software domain (including applications, programming languages, libraries, and operating systems), digital domain (including architecture, components, integrated circuits, and logic gates), and analog domain (including transistors); there is a dividing line between the software and digital domains labeled 'program abstraction barrier' and a dividing line between the digital and analog domains labeled 'digital abstraction barrier;' there is a vertical double-headed arrow on the right indicating that the items listed first on the list (and their sub-lists) have a 'high level of abstraction' and those lower on the list have a 'low level of abstraction' +6-computers/1-abstraction/01-abstraction.html:
  • libraries of useful functions that hide messy details
  • +6-computers/1-abstraction/03-software-languages.html:

    Application programmers don't often decide "I'm going to write this program in a low level language." They may simply not realize that higher levels of abstraction are possible. For example, a computer's hardware limits the size of numbers that its arithmetic unit can add in a single step. Four billion—about ten digits—is a common size limit for integers. Programmers who use Java, JavaScript, Python, C or C++ may think that this limit is unavoidable. But programmers who use really high level languages, such as Scheme or Common Lisp, know that they can do arithmetic on numbers with millions or billions of digits, limited only by the size of the computer's memory. As you will see later, Snap! has a library that lets it do this, too.

    +6-computers/1-abstraction/04-software-libraries.html:

    The Software Domain: Libraries

    +6-computers/1-abstraction/04-software-libraries.html:

    After pulling stuff into Unit 2 Lab 4 Page 2: Making a Mathematical Library for the standards, I commented out that redundant content here. --MF, 8/28/19

    +6-computers/1-abstraction/04-software-libraries.html:
    On this page, you'll learn that a library is a package of procedures written by other programmers that helps solve a problem.
    +6-computers/1-abstraction/04-software-libraries.html:

    Other common tasks (such as knowing where the mouse pointer is, doing arithmetic on huge numbers, or managing sound) also have complex parts. If programmers had to deal with all of these details in every program, no software would ever get developed. And because many applications need the same abilities, programmers write libraries for other programmers to use.

    +6-computers/1-abstraction/04-software-libraries.html:
    : Software Libraries +6-computers/1-abstraction/04-software-libraries.html:
  • A software library is a package of procedures that you can import into your program. A library is a kind of abstraction: you don't have to know any of the details of how it's coded. You can build libraries yourself, or you can use one that someone else wrote.
  • +6-computers/1-abstraction/04-software-libraries.html:
  • An application program interface (API) documents what the user of a library needs to know about it: it's a description of each procedure's purpose, inputs, and outputs (but not its algorithms).
  • --> +6-computers/1-abstraction/04-software-libraries.html:

    A common kind of API is a web API in which the library exists on someone else's computer. For example, the Google Maps API describes how to embed a Google Map on your own website.

    +6-computers/1-abstraction/04-software-libraries.html:

    Languages vs. Libraries

    +6-computers/1-abstraction/04-software-libraries.html:

    Often when people compare what different programming languages can do, they are really comparing libraries. For example, people may think they like JavaScript because they can use it to program web pages, but that's not a property of JavaScript. It's actually a web page library built into the browser that lets you program web pages.

    +6-computers/1-abstraction/04-software-libraries.html:

    Libraries in Snap!

    +6-computers/1-abstraction/04-software-libraries.html: +6-computers/1-abstraction/04-software-libraries.html: You've used libraries in Snap!. For example, when you imported the "Bar Charts" library in Unit 5 Lab 3 Page 4: Analyzing Data. +6-computers/1-abstraction/04-software-libraries.html:
  • Read through the libraries listed in Snap! (as shown above), and choose one block that interests you and that you have never used. Build a small project that uses that block, and use your project to teach that block to some of your classmates.
  • +6-computers/1-abstraction/06-digital-architecture.html: Image by Alfred Edward Chalon, Science & Society Picture Library, Public Domain, via Wikimedia. +6-computers/1-abstraction/06-digital-architecture.html: EEPROM (512 Bytes–4kBytes) is non-volatile, and is used for very long term data, like a file in a computer's disk, except that there is only a tiny amount available. Programs on the Arduino have to ask explicitly to use this memory, with an EEPROM library. +6-computers/1-abstraction/09-digital-logic-gates.html: diagram of computer abstraction hierarchy showing three levels of decreasing abstraction: software domain (including applications, programming languages, libraries, and operating systems), digital domain (including architecture, components, integrated circuits, and logic gates), and analog domain (including transistors); there is a dividing line between the software and digital domains labeled 'program abstraction barrier' and a dividing line between the digital and analog domains labeled 'digital abstraction barrier;' there is a vertical double-headed arrow on the right indicating that the items listed first on the list (and their sub-lists) have a 'high level of abstraction' and those lower on the list have a 'low level of abstraction' +6-computers/2-history-impact/1-timeline.html: Image by Alfred Edward Chalon, Science & Society Picture Library, Public Domain, via Wikimedia. +8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.html:

    PG: The controversy in the notes on the page is about good examples. We have an earlier controversy to deal with. Why are we teaching recursion at all?! /MY/ answer to that would be that it is a powerful IDEA, intellectually interesting, and related to some natural ways of thinking but more formalized (that is, making those already natural ways explicit). I emphasized IDEA, to distinguish from TECHNIQUE. Virtually everything, including letter count, can be done with more abbreviated code, if we build the appropriate tools first. LENGTH OF (LIST TO SENTENCE (list)) This does get to one of my total confusions about controversies about Snap, itself. Why are MAP, KEEP, and COMBINE in a library as opposed to in the language? Just to illustrate that it's possible to create them in Snap? Seems like the wrong way to advertise Snap's power. This feels like the same issue we're facing in our discussion of when/how to teach recursion. If we have to defend WHY to teach recursion only on its suitability as a technique for a particular problem, I think we're done in. The problems it is needed for are either already solved or too hard for our kids. Let's start with small problems that make great sense to think of recursively, even if someone else has already written the tool that saves us from having to do that. LETTER COUNT is fine. So is n^m. Factorial is also fine but less familiar than n^m. (Typically n^m is sixth or seventh grade; factorial is high school.) Looking through a list for an item (yes, exactly what CONTAINS does), UNIQUING a list.... An advantage is that these are all different applications with very similar structures, so kids are /learning how to do it/ rather than getting lots of different lessons and not learning anything well.

    +8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.html:

    As noted in email, I don't think letter count is an exception, as Mary does. But more important, I don't think students can easily compare their my join words with the join words in the tools library, because the latter is variadic, taking multiple strings as inputs rather than taking one single list of strings. As a result, its code uses the sort of hidden and obscure "input list" feature of Snap!, which we haven't taught and I'd rather avoid teaching, at least in the middle of teaching other hard stuff. --bh +8-recursive-reporters/3-subsets/2-subsets.html:

    From the Snap! file menu, choose "Libraries..." at the bottom, then choose "List Utilities" to load append and other list operations.

    +8-recursive-reporters/4-building-higher-order-functions/1-plurals-and-other-recursions.html:
    Need to have them download "Words and Sentences" library and update the image. --MF, 6/17/20
    +8-recursive-reporters/4-building-higher-order-functions/2-generalizing-the-map-pattern.html: diff --git a/cur/programming/new-ideas/aprilpd/processing-student-grades.html b/cur/programming/new-ideas/aprilpd/processing-student-grades.html index 608a1eaeaa..8721fe19d4 100644 --- a/cur/programming/new-ideas/aprilpd/processing-student-grades.html +++ b/cur/programming/new-ideas/aprilpd/processing-student-grades.html @@ -8,6 +8,8 @@

    Processing Student Grades

    +
    There is commented out text on this page. --MF, 6/11/21
    +

    On this page, you will use higher order functions to perform various operations on student grades: averaging, scaling, and selecting students within certain grade ranges.

    @@ -40,7 +42,7 @@

    Selecting within a Range with Keep

    - The keep block takes a predicate (with a blank input slot) and a list as input, and it creates a new list keeping only those items from the input list that match the condition defined by the predicate. For example:
    + The keep items 'predicate input slot' from 'list input slot' block takes a predicate (with a blank input slot) and a list as input, and it creates a new list keeping only those items from the input list that match the condition defined by the predicate. For example:
    keep items such that (is () a (number)?) from {5, :), six, 7, elephant, 3} reporting {5,7,3}
    @@ -69,7 +71,7 @@

    Selecting within a Range with Keep

    Scaling with Map

    - The map block takes two inputs: a function (a reporter with a blank input slot) and a list, and it reports a new list. In this new list, each item is the result of running an item from the original input list through the function. For example:
    + The map 'reporter input slot' over 'list input slot' block takes two inputs: a function (a reporter with a blank input slot) and a list, and it reports a new list. In this new list, each item is the result of running an item from the original input list through the function. For example:
    map (join ( ) (s)) over (list (cat) (dog) (bird)) reporting
    map (round ( )) over (list (3.14159) (87) (5.4)) reporting @@ -89,8 +91,9 @@

    Scaling with Map

    Averaging with Combine

    +
    These COMBINE example images are out of date. --MF, 6/11/21

    - The combine block takes an operation (with two blank input slots) and a list as input, and it reports a single result (not a list): the combination of the elements in the list when using the given operation. For example:
    + The combine 'list input slot' using 'reporter input slot' block takes an operation (with two blank input slots) and a list as input, and it reports a single result (not a list): the combination of the elements in the list when using the given operation. For example:
    combine with (()+()) items of (list {5,6,2,3}) reporting 16
    combine with (join words () ()) items of (list {apples, bananas, oranges, grapes}) reporting 'apples bananas oranges grapes'

    @@ -100,7 +103,7 @@

    Averaging with Combine

    1. Talk with Your Partner How could you use the combine block to help you build a block that will find the average of the student scores? What other blocks will you need?
    2. -
      You will need the red length of list block which can be found in the Variables pallete (not the green length of operator block).
      +
      You will need the red length of list block which can be found in the Variables palette (not the green length of operator block).
    3. Create an average block in Snap! that will accept a list as input and output the average of the items in the list. Try it out with your student grades list.
      average (student grades) reporting 82.15... @@ -113,8 +116,10 @@

      Averaging with Combine

    4. Find students who are closest to the class average. Use the and block together with average and keep to report the student grades that are within 5 points of the class average.
    -
    -
    For a somewhat more challenging introduction to higher order functions in a game context, see this page.
    + +
    +

    For a somewhat more challenging introduction to higher order functions in a game context, see this page.

    +
    \ No newline at end of file diff --git a/cur/programming/summaries/assessment-data2.html b/cur/programming/summaries/assessment-data2.html index 140d15d229..2da4c1d6c4 100755 --- a/cur/programming/summaries/assessment-data2.html +++ b/cur/programming/summaries/assessment-data2.html @@ -15,7 +15,8 @@

    Lab 1: Games

    2.1.1
    - What value will this code display?
    +
    Examples like this one are useful to test your understanding of assignment to variables, but you wouldn't use a sequence of assignments like this in an actual program.
    + What value will this code display?
    a ← 3
     b ← a
     a ← 4
    @@ -84,9 +85,9 @@ 

    Lab 1: Games

    -
    2.1.2 -
    +
    2.1.2 +
    +
    We really shouldn't be encouraging students to mutate a block's inputs. There are really two issues here; one is with the x=x+1 style of programming altogether, and the second is that formal parameters specifically shouldn't generally be mutated; it's better to make a script variable that's initialized to the input value. (If we change this, we need to update the Guided Notes.) --MF, 6/26/21 with BH
    mystery function (input):
 if (input < 5) (repeat until (input = 5) 
 (
@@ -130,8 +131,7 @@ <h3>Lab 1: Games</h3>
                             <div class=
    - -
    2.1.2 +
    2.1.2
    mystery function (input):
 if (input < 5) (repeat until (input = 5) 
@@ -278,7 +277,7 @@ <h3>Lab 1: Games</h3>
                         </div>
                     </div>
 <h3>Lab 2: Making Lists</h3>
-<div class= 2.2.2 +
    2.2.2

    Imagine you make a variable capitals and use set to give this list of lists a name:
    @@ -314,7 +313,7 @@

    Lab 2: Making Lists

    - length of (capitals) reports the number 8. + (length) of (capitals) reports the number 8.
    +
    +
    + item (3) of (capitals) reports the string "Boise". +
    + +
    +
    +
    + item (last) of (all but first of (capitals)) reports the string "Iowa". +
    + +
    +
    +
    + (length) of (item (1) of (capitals)) reports the number 2. +
    + +
    +
    2.2.3 diff --git a/cur/programming/summaries/exam1.html b/cur/programming/summaries/exam1.html index 3426a9ae1d..4a7cb97352 100755 --- a/cur/programming/summaries/exam1.html +++ b/cur/programming/summaries/exam1.html @@ -13,7 +13,7 @@

    Unit 1: Introduction to Programming

    Lab 2: Gossip

    1.2.2 -
    +
    AAP-3.A.6
    There is nothing exactly like say (gossip) or say (gossip) for (3) secs on the AP Exam because they don't have sprites and speech balloons, but their way of showing this text to the user is @@ -48,7 +48,7 @@

    Lab 2: Gossip

    1.2.5 -
    +
    AAP-3.E.1, AAP-3.E.2
    The expression pick random (1) to (10) would be written as
    RANDOM(1, 10)
    or RANDOM(1, 10). Every time you run this code, you will get a different random number between 1 and 10.
    diff --git a/cur/programming/summaries/index b/cur/programming/summaries/index index 281d22a4a8..09db5777f6 100755 Binary files a/cur/programming/summaries/index and b/cur/programming/summaries/index differ diff --git a/cur/programming/summaries/index-presort b/cur/programming/summaries/index-presort index 8fbbd1a430..d2f6d7633c 100755 --- a/cur/programming/summaries/index-presort +++ b/cur/programming/summaries/index-presort @@ -1,36 +1,16 @@ -when I am 1.1.2 -go to 1.1.2 -when green flag clicked 1.1.2 -when key pressed 1.1.2 -forever loop 1.1.2 -wait 1.1.2 sprite 1.1.4 costumes 1.1.4 -next costume 1.1.4 -change effect 1.1.4 transparency 1.1.4 -clear graphics effects 1.1.4 -say 1.1.5 -broadcast 1.2.2 -say 1.2.2 -when I receive 1.2.2 list 1.2.3 string 1.2.3 substring 1.2.3 concatenate 1.2.3 -list 1.2.3 -join 1.2.3 debugging 1.2.3 -set size 1.2.3 -go to x y 1.2.3 -point in direction 1.2.3 procedure 1.2.4 reporters 1.2.4 commands 1.2.4 -pick random 1.2.5 expression 1.2.5 value 1.2.5 -pick random 1.2.5 algorithm 1.3.1 pseudocode 1.3.1 parameter 1.3.3 @@ -45,13 +25,11 @@ segment, code 2.1.1 local variable 2.1.1 variable, local 2.1.1 -repeat until block 2.1.2 predicate 2.1.2 Boolean value 2.1.2 value, Boolean 2.1.2 conditionals 2.1.2 condition 2.1.2 -secret number variable 2.1.2 global variable 2.1.4 variable, global 2.1.4 initializing 2.1.4 @@ -77,6 +55,9 @@ output type 2.3.1 range 2.3.1 selection 2.3.1 +sequencing 2.3.1 +selection 2.3.1 +iteration 2.3.1 nested conditional statement 2.3.3 statement, nested conditional 2.3.3 string 2.3.5 @@ -157,6 +138,33 @@ firewall 4.2.5 DDoS (Distributed Denial of Service) attack 4.2.5 attack, DDoS (Distributed Denial of Service) 4.2.5 +rogue access point 4.2.5 +access point, rogue 4.2.5 +digital divide 4.3.5 +divide, digital 4.3.5 +citizen science 4.3.6 +science, citizen 4.3.6 +crowdsourcing 4.3.6 +computing innovation 4.3.6 +innovation, computing 4.3.6 +bit 4.4.1 +byte 4.4.1 +word 4.4.1 +binary sequence 4.4.2 +sequence, binary 4.4.2 +analog 4.4.2 +sampling 4.4.2 +samples 4.4.2 +sampling rate 4.4.2 +rate, sampling 4.4.2 +width 4.4.3 +word 4.4.3 +floating point 4.4.4 +point, floating 4.4.4 +lossless data compression 4.4.6 +data compression, lossless 4.4.6 +lossy data compression 4.4.6 +data compression, lossy 4.4.6 problem 5.1.2 instance of a problem 5.1.2 problem, instance of a 5.1.2 @@ -207,6 +215,7 @@ cleaning data 5.3.3 classifying data 5.3.5 data, classifying 5.3.5 +mode 5.3.5 metadata 5.3.6 proof by contradiction 5.4.1 contradiction, proof by 5.4.1 diff --git a/cur/programming/summaries/index-sorted b/cur/programming/summaries/index-sorted index 5ab4cf2fc1..4ca2c55bf9 100644 --- a/cur/programming/summaries/index-sorted +++ b/cur/programming/summaries/index-sorted @@ -1,11 +1,13 @@ abstract data type (ADT) 2.2.2 abstraction, data 2.2.2 abstraction, procedural 3.1.4 +access point, rogue 4.2.5 access, open 2.5.2 address, IP 4.1.3 ADT 2.2.2 AI 3.4.1 algorithm 1.3.1 +analog 4.4.2 analog 6.1.1 antivirus or anti-malware software 4.2.5 API 2.4.2 @@ -20,15 +22,16 @@ authorities, certificate 4.1.1 base case 7.1.2 binary search 5.1.3 +binary sequence 4.4.2 +bit 4.4.1 Boolean value 2.1.2 -broadcast 1.2.2 +byte 4.4.1 case, base 7.1.2 certificate authorities 4.2.3 -change effect 1.1.4 circuit, integrated 6.1.8 +citizen science 4.3.6 classifying data 5.3.5 cleaning data 5.3.3 -clear graphics effects 1.1.4 clone 3.1.5 cloud, the 4.1.1 code segment 1.5.2 @@ -40,6 +43,7 @@ computer network 4.2.5 computing device 4.1.1 computing system 4.1.1 +computing innovation 4.3.6 computing, distributed 5.1.8 computing, parallel 5.1.8 computing, sequential 5.1.8 @@ -52,9 +56,12 @@ contradiction, proof by 5.3.1 costumes 1.1.4 Creative Commons 2.5.2 +crowdsourcing 4.3.6 data 5.3.1 data abstraction 2.2.2 data type 2.2.2 +data compression, lossless 4.4.6 +data compression, lossy 4.4.6 data, classifying 5.3.5 data, cleaning 5.3.3 DDoS (Distributed Denial of Service) attack 4.2.5 @@ -65,7 +72,9 @@ decision problem 4.2.1 device, computing 4.1.1 digital 6.1.1 +digital divide 4.3.5 distributed computing 5.1.8 +divide, digital 4.3.5 domain 2.3.1 efficiency 5.1.4 element 2.2.1 @@ -77,13 +86,11 @@ expression 4.1.2 field 5.3.3 firewall 4.2.5 -forever loop 1.1.2 +floating point 4.4.4 fractal 7.1.1 free software 2.5.2 function, higher order 3.2.5 global variable 2.1.4 -go to x y 1.2.3 -go to 1.1.2 higher order function 3.2.5 index 2.3.5 index 2.1.5 @@ -92,6 +99,7 @@ infinite loop 5.3.1 information, personally identifiable 1.4.1 initializing 2.1.4 +innovation, computing 4.3.6 input 3.2.2 input type 2.3.1 insight 5.3.1 @@ -102,7 +110,7 @@ IP 4.1.3 ISPs 4.1.1 iteration 1.3.6 -join 1.2.3 +iteration 2.3.1 keylogging software 4.2.5 language, machine 6.1.6 library, software 2.4.2 @@ -111,18 +119,19 @@ linear search 5.1.2 linear time 5.1.5 list 1.2.3 -list 1.2.3 local variable 2.1.1 loop, infinite 1.5.2 loop, infinite 5.4.2 +lossless data compression 4.4.6 +lossy data compression 4.4.6 machine language 6.1.6 malware 4.2.5 metadata 5.3.6 +mode 5.3.5 modularity 3.1.4 modularity 3.2.4 nested conditional statement 2.3.3 network, computer 4.1.1 -next costume 1.1.4 open access 2.5.2 open source 2.5.2 optimization problem 5.1.6 @@ -135,8 +144,7 @@ parameter 4.1.2 personally identifiable information 1.4.1 phishing 4.2.5 -pick random 1.2.5 -point in direction 1.2.3 +point, floating 4.4.4 polynomial time 5.1.5 predicate 2.1.2 primitive data types 2.2.2 @@ -155,28 +163,31 @@ pseudocode 4.2.3 quadratic time 5.1.5 range 2.3.1 +rate, sampling 4.4.2 record 5.3.3 recursion 3.1.3 recursion 7.1.1 redundancy 4.1.2 -repeat until block 2.1.2 reporters 1.2.4 +rogue access point 4.2.5 router 4.1.1 routing 4.1.2 -say 1.1.5 -say 1.2.2 +samples 4.4.2 +sampling 4.4.2 +sampling rate 4.4.2 scalability 4.1.2 +science, citizen 4.3.6 search, binary 5.1.3 search, linear 5.1.2 search, sequential 5.1.2 -secret number variable 2.1.2 segment, code 1.5.2 selection 2.3.1 selectors 2.2.2 self-contradictory 5.4.1 +sequence, binary 4.4.2 +sequencing 2.3.1 sequential computing 5.1.8 sequential search 5.1.2 -set size 1.2.3 simulations 5.2.1 software library 2.4.2 software library 6.1.4 @@ -228,10 +239,8 @@ variable, global 2.1.1 variable, sprite 3.3.1 virus, computer 4.2.5 -wait 1.1.2 web, world wide 4.1.1 -when green flag clicked 1.1.2 -when I am 1.1.2 -when I receive 1.2.2 -when key pressed 1.1.2 +width 4.4.3 +word 4.4.1 +word 4.4.3 world wide web 4.1.1 diff --git a/cur/programming/summaries/index.c b/cur/programming/summaries/index.c index 2eefec5a42..aa1fbf01c4 100644 --- a/cur/programming/summaries/index.c +++ b/cur/programming/summaries/index.c @@ -131,6 +131,18 @@ int main(int argc, char **argv) { while (isalpha(*p)) { *pr++ = *comp++ = *p++; } + } else if (!strncmp(p, "Creat", 5)) { + while (isalpha(*p)) { + *pr++ = *comp++ = *p++; + } + } else if (!strncmp(p, "Commo", 5)) { + while (isalpha(*p)) { + *pr++ = *comp++ = *p++; + } + } else if (!strncmp(p, "I ", 2)) { + while (isalpha(*p)) { + *pr++ = *comp++ = *p++; + } } else { while (isalpha(*p)) { *pr++ = *comp++ = tolower(*p++); diff --git a/cur/programming/summaries/make-summaries.sh b/cur/programming/summaries/make-summaries.sh index 806d741e10..2a4e9f4bec 100755 --- a/cur/programming/summaries/make-summaries.sh +++ b/cur/programming/summaries/make-summaries.sh @@ -3,6 +3,9 @@ cd .. rm -f summaries/index-presort foreach Z (vocab exam assessment-data) summaries/vocab.sh $Z +echo $Z end sort -f summaries/index-presort | uniq -i > summaries/index-sorted +echo sort summaries/index +echo index diff --git a/cur/programming/summaries/vocab b/cur/programming/summaries/vocab index d283546a25..a56b3421d0 100755 Binary files a/cur/programming/summaries/vocab and b/cur/programming/summaries/vocab differ diff --git a/cur/programming/summaries/vocab-index.html b/cur/programming/summaries/vocab-index.html index 892d0a9b43..0a68f2525d 100644 --- a/cur/programming/summaries/vocab-index.html +++ b/cur/programming/summaries/vocab-index.html @@ -21,12 +21,13 @@
    • abstract data type (ADT) 2.2.2
    • abstraction, data 2.2.2
    • abstraction, procedural 3.1.4
    • +
    • access point, rogue 4.2.5
    • access, open 2.5.2
    • address, IP 4.1.3
    • ADT 2.2.2
    • AI 3.4.1
    • algorithm 1.3.1
    • -
    • analog 6.1.1
    • +
    • analog 4.4.26.1.1
    • antivirus or anti-malware software 4.2.5
    • API 2.4.26.1.4
    • application program interface (API) 2.4.26.1.4
    • @@ -43,8 +44,10 @@ @@ -52,22 +55,22 @@ @@ -88,6 +92,8 @@ @@ -119,7 +127,7 @@ @@ -190,6 +194,7 @@ @@ -197,8 +202,7 @@
      • nested conditional statement 2.3.3
      • -
      • network, computer 4.1.1
      • -
      • next costume 1.1.4 +
      • network, computer 4.1.1
      @@ -221,8 +225,7 @@
    • path 4.1.2
    • personally identifiable information 1.4.1
    • phishing 4.2.5
    • -
    • pick random 1.2.5
    • -
    • point in direction 1.2.3
    • +
    • point, floating 4.4.4
    • polynomial time 5.1.5
    • predicate 2.1.2
    • primitive data types 2.2.2
    • @@ -251,11 +254,12 @@
      • range 2.3.1
      • +
      • rate, sampling 4.4.2
      • record 5.3.3
      • recursion 3.1.37.1.1
      • redundancy 4.1.2
      • -
      • repeat until block 2.1.2
      • reporters 1.2.4
      • +
      • rogue access point 4.2.5
      • router 4.1.1
      • routing 4.1.2
      • @@ -263,19 +267,22 @@ -
        • say 1.1.51.2.2
        • +
          • samples 4.4.2
          • +
          • sampling 4.4.2
          • +
          • sampling rate 4.4.2
          • scalability 4.1.2
          • +
          • science, citizen 4.3.6
          • search, binary 5.1.3
          • search, linear 5.1.2
          • search, sequential 5.1.2
          • -
          • secret number variable 2.1.2
          • segment, code 1.5.2
          • selection 2.3.1
          • selectors 2.2.2
          • self-contradictory 5.4.1
          • +
          • sequence, binary 4.4.2
          • +
          • sequencing 2.3.1
          • sequential computing 5.1.8
          • sequential search 5.1.2
          • -
          • set size 1.2.3
          • simulations 5.2.1
          • software library 2.4.26.1.4
          • software, antivirus or anti-malware 4.2.5
          • @@ -343,12 +350,9 @@ -
            • wait 1.1.2
            • -
            • web, world wide 4.1.1
            • -
            • when green flag clicked 1.1.2
            • -
            • when i am 1.1.2
            • -
            • when i receive 1.2.2
            • -
            • when key pressed 1.1.2
            • + diff --git a/cur/programming/summaries/vocab.c b/cur/programming/summaries/vocab.c index 4ce5a25082..61f8524e85 100644 --- a/cur/programming/summaries/vocab.c +++ b/cur/programming/summaries/vocab.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) { int fin,fout,findex,funit; int bflag,i,len,depth,first=1,firstpage=1,vocab=0,boxnum=0; int wordflag=1,lowerme=0,spanlength; - char *mem,*startp,*endp,*nextp,*foop,*bazp,*spacep,*spanp; + char *mem,*startp,*endp,*nextp,*foop,*bazp,*spacep,*spanp,*commentp; FILE *fp; char ch; @@ -109,7 +109,7 @@ int main(int argc, char **argv) { "%s%c", argv[i],topic,argv[i],sect,'\0'); len=lseek(fin,0L,2); /* get file length */ - mem=(char *)mmap(NULL,len,PROT_READ,MAP_SHARED,fin,0); + mem=(char *)mmap(NULL,len,PROT_READ,MAP_PRIVATE,fin,0); len = ((len + page_size)/page_size)*page_size; if (first) { first = 0; @@ -127,8 +127,20 @@ int main(int argc, char **argv) { } else { endp=mem; } + + /* flush html comments */ +/* commentp=endp; + while ((startp=strstr(commentp,""); + if (bazp != NULL) { + for (foop=startp+4;foop"); + if (bazp!=NULL && bazp \n%c",++boxnum,'\0'); + sprintf(h2,"\n \n%c",++boxnum,'\0'); (void)write(fout,h2,strlen(h2)); } } @@ -267,9 +282,9 @@ int main(int argc, char **argv) { *(spacep) = '\0'; spacep = strchr(spacep+2,'>'); *(strchr(spacep+1,'<')) = '\0'; - foop += 9; // don't write nulls + foop += 9; // don't write nulls ' } - if (*(spacep+1) == '(') { + if (*(spacep+1) == '(') { // \0x28 strncpy(commaentry, spacep+2, 1+strchr(spacep+1,')')-spacep); *(strchr(commaentry,')')) = '\0'; @@ -285,7 +300,6 @@ int main(int argc, char **argv) { outname,boxnum,outname,boxnum,sect,'\0'); (void)write(findex,link2,strlen(link2)); } -// } startp = bazp; } else { startp = endp; @@ -293,7 +307,7 @@ int main(int argc, char **argv) { } // end of one relevant div } // if vocab } // end of one input file (page) - if (vocab) { + if (0 && vocab) { bazp = strstr(endp,"
              Unit 1: Introduction to Programming

              Lab 1: Click Alonzo Game

              1.1.4: Sprites and Costumes -  + 

              The Alonzo character is named after Alonzo Church, a major contributor to early computer science. In this project, there are three objects related to Alonzo:

              • One is a sprite, which is like an actor on the stage who knows how to do many different things, such as walk around the stage and speak the lines of the play.
              • @@ -22,7 +22,7 @@

                Lab 1: Click Alonzo Game

              1.1.4 -  + 

              The transparency of an image is how much you can see what's behind it. For example, here is the Alonzo sprite shown with three different transparencies (which have been set using the ghost effect block).
              three pictures of Alonzo, with ghost effect 0%, 25%, and 50%, on a background of a brick wall @@ -30,9 +30,9 @@

              Lab 1: Click Alonzo Game

              Lab 2: Gossip

              1.2.3: Lists, Strings, and Concatenation -  + 
                -
                +
                AAP-1.C.1 first sentence
              • A list is an ordered set of items. You've seen this example:
                @@ -44,11 +44,11 @@

                Lab 2: Gossip

              1.2.3 -  + 

              The process of testing, finding problems, and fixing them is called debugging.

              1.2.4: Procedures, Reporters, and Commands -  + 
              AAP-3.A.1, AAP-3.A.2

              A procedure is a named sequence of instructions that may take inputs and may report a value. Some languages call procedures methods or functions. Here are two types of procedures you have seen in Snap!: @@ -69,22 +69,22 @@

              Lab 2: Gossip

              1.2.5: Expressions and Values -  + 
              AAP-2.B.3, AAP-2.B.4
                -
              • An expression is a either a constant value (such as "4" or "winter") or a call to a reporter block with any input slots filled in (such as number, 5 + (4 * 3), or join (who) ( ) (does what) ( ) (who)).
              • +
              • An expression is a either a constant value (such as "4" or "winter") or a call to a reporter block including its inputs (such as number, 5 + (4 * 3), or join (who) ( ) (does what) ( ) (who)).
              • Expressions are evaluated to produce a single value (a value can be a number, a string, a sprite, a costume, a script, a list—anything). For example, 5 + (4 * 3) will be evaluated to 17.

              Lab 3: Modern Art with Polygons

              1.3.1: Algorithm and Pseudocode -  + 
              AAP-2.A.1, AAP-2.A.2, AAP-2.A.3

              An algorithm is a sequence of steps that are usually performed by a computer. The algorithm doesn't have to be written in any particular programming language or even in a programming language at all; you can write your algorithm in English or any other human language. Some people call an algorithm written in human language pseudocode. Once you know the steps that the computer will take, you can code your algorithm in the programming language of your choice.

              What's the purpose of "pseudocode"? Why write an algorithm vaguely in English when you could write it precisely in Snap!? If you were programming in a punctuation-heavy language, designing your program in pseudocode would help you focus on the important ideas instead of on details like quotation marks and semicolons. But pseudocode isn't as necessary with a language like Snap!, and pseudocode can make it easy for you to fall into wishful thinking about what the computer is capable of (such as writing "Pick tomorrow's winning lottery numbers" or "Here's the melody; write the harmony").
              1.3.3: What's an input? Parameter vs. Argument -  + 
              AAP-3.A.3

                @@ -101,7 +101,7 @@

                Lab 3: Modern Art with Polygons

              1.3.6: Iteration -  + 
              AAP-2.J.1

              Computer scientists describe a repeating program structure as looping, repetition, or iteration.

              AAP-2.K.1
              @@ -121,17 +121,17 @@

              Lab 3: Modern Art with Polygons

              Lab 4: Protecting Your Privacy

              1.4.1 -  + 
              IOC-2.A.1

              Personally identifiable information (PII) is information that can let others figure out who you are and possibly get more information like your Social Security number, age, race, phone number(s), medical information, financial information, or biometric data (such as your thumbprint or face scan).

              Lab 5: Follow the Leader

              1.5.2 -  + 

              When a program keeps running forever, that's called an infinite loop.

              1.5.2 -  + 
              CRD-2.B.2, AAP-2.B.2, AAP-2.B.6

              A code segment is a sequence of connected instructions that carry out a purposeful action, such as the one pictured on the left, which animates a conversation. The instructions in the code segment are carried out in order, from top to bottom.

              diff --git a/cur/programming/summaries/vocab2.html b/cur/programming/summaries/vocab2.html index 4ce0c9c501..311c44c9f9 100755 --- a/cur/programming/summaries/vocab2.html +++ b/cur/programming/summaries/vocab2.html @@ -13,17 +13,17 @@

              Unit 2: Abstraction

              Lab 1: Games

              2.1.1: Variable -  + 
              AAP-1.A.1

              A variable is like a box that can hold one value at a time, such as one word, one costume, or one list (which can contain many things). You can look at what's inside as many times as you want.

              On Unit 1 Lab 2 Page 2: Making Programs Talk, you learned about procedural abstraction: giving scripts names by putting them in new blocks. Here, we are starting to look at data abstraction, giving names to numbers, text, lists, etc. When you give something a name, you can refer to it without knowing exactly what the value is.
              2.1.1: Local Variable -  + 

              A local variable can be set or used only in the environment in which it is defined. This term includes inputs to procedures and variables created by the for or script variables block.

              2.1.2: Predicate and Boolean value -  + 
              2.1.2 -  + 

              The if and if-else blocks are called conditionals because they control the code based on a true-or-false condition.

              2.1.4: Global Variable -  + 

              A global variable is a variable that is usable by all scripts in the program.

              2.1.4 -  + 

              Setting the starting value of a variable is known as initializing the variable.

              2.1.5: Index -  + 

              The position number is called the index of the item in the list.
              item (2) of (list (apple) (cantaloupe) (banana)) reporting 'cantaloupe'
              @@ -94,16 +94,17 @@

              Lab 1: Games

              Lab 2: Making Lists

              2.2.1 -  + 
              AAP-1.C.2

              An element is another name for an item in a list. (If the same value is in the list twice, that counts as two different elements.) Each element has a unique index (position) in the list.

              2.2.2: Sublist -  -

              A sublist is a list as an item of another list.

              +  +

              A sublist is a list used as an item of another list.

              +

              (The word sublist is also used to refer to some subset of a list.)

              2.2.2: Data Types -  + 
              • A data type is what kind of data something is (number, text string, list, etc.). For example, number is the data type for the first input to item (1) of () and list is the the data type for its second input. @@ -118,7 +119,7 @@

                Lab 2: Making Lists

              2.2.2: Abstract Data Types -  + 
                AAP.1.D.1
                @@ -144,35 +145,35 @@

                Lab 2: Making Lists

              2.2.3 -  + 

              Using the result from item as the input to address from contact is called composition of functions.

              2.2.3: Traversing a List -  + 
              AAP-2.O.2

              Traversing a list means looking at each item of the list. For each is iterative. That is, it's repetitive, like for, which can also traverse a list. But unlike for, for each traverses the list without using index numbers.

              Lab 3: Making Decisions

              2.3.1: Domain and Range -  + 
              • The input type (often called domain by programmers) of a function is the type of data that it accepts as input.
              • The output type (often called range) of a function is the type of data that it reports as output.
              -
              2.3.1: Selection -  +
              2.3.1: Sequencing, Selection, Iteration + 
              Selection: AAP-2.G.1; sequencing, selection, iteration: AAP-2.A.4

              Selection means deciding (selecting) which part of an algorithm to run based on whether a condition is true or false.

              -

              Every algorithm can be constructed using sequencing (following steps in order), selection (deciding), and iteration (repeating).

              +

              Every algorithm can be constructed using sequencing (following steps in order), selection (deciding), and iteration (repeating).

              2.3.3 -  + 
              AAP-2.I.1, AAP-2.I.2

              A nested conditional statement is an if or if else statement inside the else part of another if else statement. If the predicate of the outer if else statement is false, then inner (nested) conditional statement will test its predicate and decide what to do.

              2.3.5: String and Index -  + 
                AAP-1.C.4
              • A string is an ordered sequence of characters.
              • @@ -181,17 +182,17 @@

                Lab 3: Making Decisions

              2.3.6 -  + 

              All the words in the puzzle are related to the AP CS Principles course.

              Lab 4: Making Computers Do Math

              2.4.2 -  + 
              AAP-3.D.1

              A software library is a collection of procedures that can be used in programs.

              2.4.2: APIs -  + 
              AAP-3.D.4, AAP-3.D.5

              An application program interface (API) documents what a programmer needs to know about using a library: it's a description of each procedure's purpose, inputs, and outputs (but not its algorithms).

              @@ -211,20 +212,42 @@

              Lab 4: Making Computers Do Math

              Lab 5: Copyrights

              2.5.2 -  + 
              IOC-1.F.5
                -
              • Creative Commons is a specific copyright license that allows others to use, share, and revise your work.
              • +
              • Creative Commons is a specific family of copyright licenses that allow others to use, share, maybe sell, and maybe revise your work.
              2.5.2 -  + 
              IOC-1.F.5

              Ideas similar to Creative Commons are used for particular kinds of material:

                -
              • Free software means software that anyone can copy, use, modify, and redistribute.
              • -
              • Open source software is a more general term that means that you put the program's code online. You may still restrict how people can use the program.
              • +
              • Free software means software that anyone can copy, use, modify, and redistribute, including commercially, provided that any modifications must be under the same license.
              • +
                + Read More + Doesn't the “provided that” make it unfree? +
                + The reason for that restriction is to prevent other people from + turning a modified version of the software into non-free software + with restrictive licensing. That's the only thing you're not + allowed to do: make it unfree. +
                +
                +
              • Open source software is a more general term that means that you make the program's source (human-readable) code available to anyone. You may still restrict how people can use the program.
              • +
                + Read More + What's the point of making it available if people aren't allowed to use it? +
                + One reason is for security software, so that people can check that + the software isn't leaking your password or other data, and will + therefore trust you. (One reason many people don't trust + computerized voting machines is that their manufacturers + keep their code secret.) Another reason for open source is that you're hoping other + people will contribute improvements to your proprietary software. +
                +
              • Open access scholarly research reports are available for free download, rather than requiring the permission of a journal publisher.

              diff --git a/cur/programming/summaries/vocab3.html b/cur/programming/summaries/vocab3.html index 5a5acfe108..45a1346297 100755 --- a/cur/programming/summaries/vocab3.html +++ b/cur/programming/summaries/vocab3.html @@ -13,52 +13,52 @@

              Unit 3: Data Structures

              Lab 1: Dealing with Complexity

              3.1.3 -  + 

              Calling a procedure from inside itself is called recursion.

              3.1.4: Abstraction -  + 
              AAP-3.B.1, AAP-3.B.5

              As you learned in Unit 1 Lab 2 Page 2: Making Programs Talk, procedural abstraction is the process of developing a program by breaking up a large problem into smaller sub-problems.

              Creating a draw brick block lets you think in terms of a procedure with a name related to the problem you are solving. This makes your code easier to read, and once you've coded and debugged the block, you don't need to think about how it works each time you use it. That's the beauty of procedural abstraction.

              3.1.4 -  + 
              AAP-3.B.2, AAP-3.B.3

              Modularity is the process of breaking a problem into smaller pieces. Modularity is a form of procedural abstraction.

              3.1.5 -  + 

              A clone is a copy of a sprite that shares information with its parent sprite (the original sprite). For example, clones have copies of any scripts from the parent, and if the parent's script is changed, then the clones' scripts change too. However, changes you make to a clone are not shared with the parent, so you can do things like move each clone to a different position.

              3.1.6 -  + 

              Debugging is the art of identifying errors in computer programs and fixing them.

              Lab 2: Contact List

              3.2.2: Input and Output -  + 
              CRD-2.C.1, CRD-2.C.4, CRD-2.C.6, CRD-2.D.1, CRD-2.D.2

              We use "input" loosely to mean the empty boxes in a block that get filled with values. But input also means information entered into a program by the user, as in the ask and wait block. Program input can also come from data tables, sounds, pictures, video, or other programs.

              Similarly, program output means any data sent from your program to the user or to any device. Typically, the output depends on the input.

              3.2.4 -  + 
              AAP-3.B.2, AAP-3.B.3

              Modularity is the process of breaking a programming project up into separate sub-problems. For example on page 2 of this lab, you built code to add a contact to your app, and on this page, you built code to find contacts.

              3.2.5 -  + 

              A higher order function is a function that takes a function as input (or reports a function as output).

              Lab 3: Tic-Tac-Toe

              3.3.1: Sprite Variable -  + 

              A sprite variable is like a global variable in that it doesn't belong to a particular script, but it does belong to a particular sprite.

              Lab 4: Robots and Artificial Intelligence

              3.4.1 -  + 

              Artificial intelligence (AI) is a field of computer science loosely defined as "trying to get computers to think."

              diff --git a/cur/programming/summaries/vocab4.html b/cur/programming/summaries/vocab4.html index caa09804e7..dbd00a5e03 100755 --- a/cur/programming/summaries/vocab4.html +++ b/cur/programming/summaries/vocab4.html @@ -13,7 +13,7 @@

              Unit 4: How the Internet Works

              Lab 1: Computer Networks

              4.1.1 -  + 
              • The Internet is a computer network that uses open protocols to standardize communication. A computing device connected to an Internet-connected device is required to access the Internet. @@ -28,7 +28,7 @@

                Lab 1: Computer Networks

              4.1.1 -  + 
              • A router is a computer that passes information from one network to another.
              • Your computer probably uses a router that is somewhere in your home to connect to your ISP.

                @@ -37,7 +37,7 @@

                Lab 1: Computer Networks

              4.1.1 -  + 
                CSN-1.A.7, CSN-1.A.8
              • Bandwidth is the maximum amount of data that can be sent in a fixed amount of time (for digital data, it is measured in bits per second). Higher bandwidth is better because the data will travel more quickly.
              • @@ -45,7 +45,7 @@

                Lab 1: Computer Networks

              4.1.2 -  + 
              CSN-1.A.5, CSN-1.A.6, CSN-1.B.6, CSN-1.E.2, CSN-1.E.5
              • A path is a sequence of directly connected computing devices that connect a sender to a receiver.
              • @@ -56,7 +56,7 @@

                Lab 1: Computer Networks

              4.1.3 -  + 
              CSN-1.B.3, CSN-1.C.1
              • A protocol is set of rules that specify the behavior of a system.
              • @@ -66,7 +66,7 @@

                Lab 1: Computer Networks

              4.1.3 -  + 

              TCP/IP is a pair of protocols that provide two levels of abstraction:

                @@ -77,7 +77,7 @@

                Lab 1: Computer Networks

              Lab 2: Cybersecurity

              4.2.1: Encryption and Decryption -  + 
              IOC-2.B.5
              • Encryption is the process of encoding data to prevent unauthorized access.
              • @@ -85,27 +85,27 @@

                Lab 2: Cybersecurity

              4.2.1: Symmetric Encryption -  + 
              IOC-2.B.5

              Substitution ciphers are examples of symmetric encryption because they use the same key for both encryption and decryption.

              4.2.3 -  + 
              IOC-2.B.5

              Public key encryption uses a pair of keys: a public key for encryption and a private key for decryption. The sender uses the public key to encrypt the message, and receiver uses their private key to decrypt it.

              4.2.3 -  + 

              SSL/TLS (secure sockets layer/transport layer security) is the standard used for cryptographically secured information transfer on the Internet.

              4.2.3 -  + 
              IOC-2.B.6

              Certificate authorities are organizations that issue digital certificates to verify who owns the encryption keys used for secured communications.

              Instead of trusting that the website is who they say they are, you now have to trust that the Certificate Authority is reliable.

              4.2.5 -  + 
              malware: IOC-2.B.9, keylogging: IOC-2.C.2, virus: IOC-2.B.8, antivirus or anti-malware software: IOC-2.B.7, phishing: IOC-2.C.1
              • Malware is software that was designed to harm or take partial control over your computer.
              • @@ -117,8 +117,75 @@

                Lab 2: Cybersecurity

              4.2.5 -  + 

              A DDoS (Distributed Denial of Service) attack uses a virus to flood a server with many requests from many computers at once so that users of that server are denied service.

              -
              4.2.5: A rogue access point is a wireless access point that gives access to a secure network without the authorization of the network administrator.
              -  +
              4.2.5: +  +A rogue access point is a wireless access point that gives access to a secure network without the authorization of the network administrator.

              +

              Lab 3: Community and Online Interactions

              +
              4.3.5 +  +
              IOC-1.C.1, IOC-1.C.2, IOC-1.C.3
              +

              The digital divide refers to unequal access to computers and the Internet based on poverty, racism, sexism, isolation in the countryside, age, and other factors. The digital divide affects both individuals within a country and countries themselves.

              +
              +
              4.3.6 +  +
                +
                IOC-1.E.3, IOC-1.E.4 (vocab box)
                +
              • Citizen science is scientific research conducted in whole or part by distributed individuals, many of whom may not be scientists, who contribute relevant data to research using their own computing devices.
              • +
              • Crowdsourcing is the general term for using the Internet to get a lot of people to help solve a problem. (Citizen science is a type of crowdsourcing.)
              • +
              +
              +
              4.3.6 +  +
              CRD-1.A.1, CRD-1.A.2
              +
                +
              • A computing innovation can be physical (such as a self-driving car), non-physical software (such as picture editing software), or conceptual (such as the idea of e-commerce), but regardless of the form, they must include a program as an integral part of their function.
              • +
              +
              +

              Lab 4: Data Representation and Compression

              +
              4.4.1: Bit +  +
              DAT-1.A.3
              +

              A bit is a single unit of data that can only have one of two values. We usually represent the two values as 0 (off) and 1 (on).

              +
              +
              4.4.1: Byte and Word +  +
              DAT-1.A.4
              +

              A byte is eight bits.

              +

              A word is the number of wires that connect the processor to the memory. As of 2017, words are 32 or 64 bits.

              +
              +
              4.4.2 +  +

              A binary sequence (also called a bitstream) is a string of ones and zeros.

              +
              +
              4.4.2 +  +

              Analog data have values that change smoothly, unlike digital data which change in discrete intervals.

              +

              Sampling means measuring values, called samples, of an analog signal at regular intervals.

              +

              The sampling rate is the number of samples measured per second.

              +
              +
              4.4.3 +  +

              width: the number of bits that a CPU processes at a time

              +

              word: a binary sequence of that many bits

              +
              +
              4.4.4 +  +

              Scientific notation (such as 2,350,000 = 2.35 × 106) uses powers of ten to represent very large or very small values. Floating point is the same idea but with powers of two.

              +
              4.4.5: Bit +  +
              DAT-1.A.3
              +

              The word "bit" is an abbreviation for binary digit.

              +
              +
              4.4.6: Lossless Compression +  +

              Lossless data compression algorithms (such as PNG) are reversible (there is no loss in quality); you can reconstruct the original data.

              +
              +
              4.4.6: Lossy Compression +  +

              Lossy data compression algorithms are not fully reversible; you can reconstruct only an approximation of the original data.

              +
              + + diff --git a/cur/programming/summaries/vocab5.html b/cur/programming/summaries/vocab5.html index 8ab4947e61..1213cfc3b0 100755 --- a/cur/programming/summaries/vocab5.html +++ b/cur/programming/summaries/vocab5.html @@ -13,7 +13,7 @@

              Unit 5: Algorithms and Simulations

              Lab 1: Search Algorithms and Efficiency

              5.1.2: Problem and Instance of a Problem -  + 
              AAP-4.A.1
              • A problem is a general description of a task that may (or may not) be solved algorithmically.
              • @@ -21,7 +21,7 @@

                Lab 1: Search Algorithms and Efficiency

              5.1.2: Linear Search or Sequential Search -  + 
              • An algorithm takes linear time if multiplying the input size by ten multiplies the time required by ten.
                graph of size vs. time showing a straight line through the origin and up to the right with the points for x=10,000 and x=100,000 marked @@ -31,7 +31,7 @@

                Lab 1: Search Algorithms and Efficiency

              5.1.3: Binary Search -  + 
              AAP-2.P.1, AAP-2.P.2

              A binary search algorithm starts in the middle of a sorted list and repeatedly eliminates half the list until either the desired value is found or all elements have been eliminated.

              AAP-2.O.1
              @@ -39,12 +39,12 @@

              Lab 1: Search Algorithms and Efficiency

              Linear search does a complete traversal of the list. Binary search saves time by doing a partial traversal of the list.

              5.1.4 -  + 
              AAP-4.A.3

              The relationship between the input size and the number of steps required to solve a problem is the efficiency of the algorithm used to solve the problem.

              5.1.5 -  + 
              • An algorithm takes linear time the number of steps is proportional to the input size; doubling the input size doubles the time required.
              • An algorithm takes sublinear time if the time grows more slowly than the size.
              • @@ -53,7 +53,7 @@

                Lab 1: Search Algorithms and Efficiency

              5.1.5 -  + 
              • An algorithm takes polynomial time if the number of steps is less than or equal to a power of the size of the input, such as constant (n0), sublinear, linear (n1), quadratic (n2), or cubic (n3). @@ -65,7 +65,7 @@

                Lab 1: Search Algorithms and Efficiency

              5.1.6 -  + 
              AAP-4.A.2
              • A decision problem is a problem with a true/false answer (for example, "is 5,825,496,221 a prime number?").
              • @@ -73,13 +73,13 @@

                Lab 1: Search Algorithms and Efficiency

              5.1.6 -  + 
              AAP-4.B.1, AAP-4.B.2, AAP-4.B.3

              A decidable problem a decision problem for which it's possible to write an algorithm that will give a correct output for all inputs.

              An undecidable problem is the opposite. It's not possible to write an algorithm that will give a correct output for all inputs—even though it might be possible for some of them.

              5.1.8: Sequential and Parallel Computing -  + 
              CSN-2.A.1, CSN-2.A.2

              This section covers two computational models: @@ -90,18 +90,18 @@

              Lab 1: Search Algorithms and Efficiency

              5.1.8 -  + 
              CSN-2.A.3

              Distributed computing is a form of parallel computing that uses multiple computers (perhaps even spread out around the world).

              5.1.8 -  + 

              A processor is a piece of circuitry inside a computer that processes the instructions from computer programs.

              CPU

              Image credit: Wikipedia user Solipsist

              5.1.8 -  + 
              CSN-2.A.7

              Programmers refer to the speedup of parallel solution to describe how many times as fast the parallel solution is compared to the sequential solution:
              @@ -110,13 +110,13 @@

              Lab 1: Search Algorithms and Efficiency

              Lab 2: Simulations

              5.2.1 -  + 
              AAP-3.F.1, AAP-3.F.2

              Simulations are computer representations of real things or situations that vary over time. A simulation is an abstraction designed for a particular purpose.

              Lab 3: Turning Data into Information

              5.3.1: Data vs. Information -  + 
              DAT-2.A.1
              • Data are the values that computers receive from various sources, including human activity, sensors, etc.
              • @@ -125,7 +125,7 @@

                Lab 3: Turning Data into Information

                DAT-2.A.2
                Data provide opportunities for identifying trends, making connections, and addressing problems. Information is the result of analyzing that data.

              5.3.1 -  + 

              A correlation is a particular kind of information, namely a dependence between two variables in a situation. For example in the first picture here, as one variable goes up the other goes down. It's also a correlation when as one variable goes up or down the other changes in the same manner.

              @@ -141,12 +141,12 @@

              Lab 3: Turning Data into Information

              5.3.1 -  + 
              DAT-2.E.4

              Insight is a meaningful conclusion drawn from analyzing information.

              5.3.3: Records, Fields, and Columns -  + 
              • A record is one row in a dataset (other than the first row, which contains the column headings). A single record might be the data for one student in your school, the data for one earthquake that happened, the data for one hospital in the U.S, or the data for one contact in your contact list. In other words, a record is a horizontal slice of the dataset.
              • A field is one item of a record in a dataset. It might be one person's homeroom teacher, the magnitude of an earthquake in Los Angeles last week, the owner of one hospital in Chicago, or the phone number of one person in your contact list.
              • @@ -155,38 +155,26 @@

                Lab 3: Turning Data into Information

                three frame animation of the report of cars dataset displayed as a table with columns and rows; in the first frame, the fourth row of the table is highlighted and labeled 'record (row)'; in the second frame, the third column of the table is highlighted and labeled 'column'; in the third frame, the cell in the fourth row and third column is highlighted and labeled 'field'
              5.3.3 -  + 
              DAT-2.C.4, DAT-2.E.2

              Cleaning data is the process of making the data uniform without changing its meaning (such as replacing abbreviations, spellings, and capitalizations with the intended word or converting miles to kilometers). Programmers can use programs to filter and clean digital data, thereby gaining insight and knowledge.

              5.3.5 -  + 
              DAT-2.E.3 classifying only

              Classifying data is extracting groups of data with a common characteristic.

              -
              5.3.5

              The mode of a data set is the value that appears most often in it.

              -  - Here is a bar chart of field 11 from the cars data set (highway MPG) with MPG values from 5 to 50, using an interval of 3. Identify the mode. It will be a range of values such as 13–15 or 16–18.
              - - - -
            • - Here is another bar chart with all the inputs the same as before, but with an interval of 6. Identify the mode.
              - - -
            • -
            • Talk with Your Partner How can these results both be correct? (There's nothing wrong with the graphs.)
            • -
            • Talk with Your Partner Why would you ever use an interval larger than 1? If you have time, research this question.
            • - -
              +
              5.3.5 +  +The mode of a data set is the value that appears most often in it.

              5.3.6 -  + 
              DAT-2.B.1

              Metadata are data about data. For example, the piece of data may be an image, while the metadata may include the date of creation or the file size of the image.

              Lab 4: Unsolvable and Undecidable Problems

              5.4.1 -  + 

              A proof by contradiction is a two-step proof that something is false that is done by:

                @@ -196,12 +184,12 @@

                Lab 4: Unsolvable and Undecidable Problems

              5.4.1 -  + 

              An undecidable statement might be true or might be false; we don't know which.

              A self-contradictory statement can be neither true nor false.

              5.4.2 -  + 

              An infinite loop is a sequence of computer instructions that repeats forever.

              An unsolvable problem is one for which no algorithm can ever be written to find the solution.

              An undecidable problem is one for which no algorithm can ever be written that will always give a correct true/false decision for every input value. Undecidable problems are a subcategory of unsolvable problems that include only problems that should have a yes/no answer (such as: does my code have a bug?).

              diff --git a/cur/programming/summaries/vocab6.html b/cur/programming/summaries/vocab6.html index 6da2ce9fb0..8d3e4559d7 100755 --- a/cur/programming/summaries/vocab6.html +++ b/cur/programming/summaries/vocab6.html @@ -13,11 +13,11 @@

              Unit 6: How Computers Work

              Lab 1: Computer Abstraction Hierarchy

              6.1.1: analog vs. digital -  + 

              Digital and analog are opposites. Digital means information that is represented as ones and zeros. Analog means information that is represented by signals that vary continuously (that is, including in-between values).

              6.1.4: Software Libraries -  + 
              AAP-3.D.1, AAP-3.D.2, AAP-3.D.3
              • A software library is a package of procedures that you can import into your program. A library is a kind of abstraction: you don't have to know any of the details of how it's coded. You can build libraries yourself, or you can use one that someone else wrote.
              • @@ -26,12 +26,12 @@

                Lab 1: Computer Abstraction Hierarchy

              6.1.6 -  + 

              Machine language is the lowest-level programming language; it is directly understood by the computer hardware.

              Architecture is an abstraction, a specification of the machine language. It also tells how the processor connects to the memory. It doesn't specify the circuitry; the same architecture can be built as circuitry in many different ways.

              6.1.8 -  + 

              An integrated circuit ("IC" or "chip") is a single physical device that contains millions or billions of basic electrical parts. A processor is an IC, but not all ICs are processors; there are also special-purpose chips inside a computer.

              diff --git a/cur/programming/summaries/vocab7.html b/cur/programming/summaries/vocab7.html index 7aa01cb407..87c3172ba9 100755 --- a/cur/programming/summaries/vocab7.html +++ b/cur/programming/summaries/vocab7.html @@ -13,20 +13,20 @@

              Unit 7: Fractals and Recursion

              Lab 1: Trees

              7.1.1 -  + 

              A fractal is an infinite repeating pattern made up of copies (or slight variations) of the same shape. In this picture, the green branch is (essentially) the same shape as the entire picture.

              7.1.1 -  + 

              State transparency means putting everything back exactly as it was when you started. It is especially important when blocks depend on other blocks. Usually, this means returning the sprite to the same position and direction and returning the pen to the same color and size.

              7.1.1 -  + 

              Using a block inside of itself is called recursion.

              7.1.2 -  + 

              This different version for the lowest level of a recursive script is called the base case.

              diff --git a/cur/programming/summaries/vocab8.html b/cur/programming/summaries/vocab8.html index ad8876c938..67e03a0749 100755 --- a/cur/programming/summaries/vocab8.html +++ b/cur/programming/summaries/vocab8.html @@ -13,7 +13,7 @@

              Unit 8: Recursive Functions

              Lab 3: Subsets

              8.3.1 -  + 

              A subset is a selection of items from a set; it can be none, all, or any number in between.

              diff --git a/cur/snap-cheat-sheet.html b/cur/snap-cheat-sheet.html index 57dd3faacd..a9254041b7 100644 --- a/cur/snap-cheat-sheet.html +++ b/cur/snap-cheat-sheet.html @@ -252,7 +252,7 @@

              Iteration

              turn ↻ (90) degrees change (squiral length) by (-5) }" /> - arrowhead sprite has just drawn a square sprial but stopped before reaching the center + arrowhead sprite has just drawn a square spiral but stopped before reaching the center

              @@ -274,7 +274,7 @@

              List Operations

              - You can tell what kind of input is expected in each input slot of a block in Snap! by its shape. For example, item () of () takes a number as its first input (indicated by the round input slot) and a list as its second input (indicated by the small picture of a list):
              + You can tell what kind of input is expected in each input slot of a block in Snap! by its shape. For example, item () of 'list input slot' takes a number as its first input (indicated by the round input slot) and a list as its second input (indicated by the small picture of a list):
              picture of 2-item list
              In addition, there is a drop-down menu for the first input slot allowing you to select the first, the last, or a random item from the list instead of typing a number or dragging and dropping a variable in.

              @@ -406,7 +406,7 @@

              Robot

              In Snap!, you can use the move ( ) steps block to move the sprite forward any number of steps.

              On the exam, you can't give
              MOVE_FORWARD ()
              an input, so if you want to move more than one grid square, you have to call the procedure repeatedly.
              -
              You can use the move block in Snap! to simulate the AP
              MOVE_FORWARD ()
              procedure: Just use an input that is exactly the same size as the sidelength of the squares in your grid.
              +
              You can use the move block in Snap! to simulate the AP
              MOVE_FORWARD ()
              procedure: Just use an input that is exactly the same size as the side length of the squares in your grid.
              diff --git a/cur/snap-crash-course.html b/cur/snap-crash-course.html index dfd43f1899..050afc89fe 100644 --- a/cur/snap-crash-course.html +++ b/cur/snap-crash-course.html @@ -53,13 +53,13 @@

              -

              To save a project, choose "Save" from the Snap! File menu, File button (or press control-s).

              +

              To save a project, choose "Save" from the Snap! File menu, File menu button (or press control-s).

              To load a project, choose "Open..." from the Snap! File menu (or press control-o), select the project you wish to open, and click "Open." Always remember to save the project you were working on before opening a new one.

              Snap! Cheat Sheet page:
              - item ( ) of 'list input slot' + item () of 'list input slot' insert ( ) at (1) of 'list input slot' add ( ) to 'list input slot' delete (1) of 'list input slot' diff --git a/cur/solutions-assessments/1-solutions-assessments.html b/cur/solutions-assessments/1-solutions-assessments.html index 9bf2516355..a5d6babaa7 100644 --- a/cur/solutions-assessments/1-solutions-assessments.html +++ b/cur/solutions-assessments/1-solutions-assessments.html @@ -64,7 +64,7 @@

              Lab 4: Protecting Your Privacy

            • -

              There are no right answers to these questions, whose purpose is to start students thinking about what information about them is on the net. They'll easily think of the things they post on purpose, such as their Facebook profile. (But they might not be aware of who can see that profile, which includes companies whose products they've "liked.") But have they ever bought anything online? If so, their name as addressee is probably connected with their parent's name as credit cardholder. Have they borrowed a library book? Was it about politics, race, or sexuality? (Libraries are generally very good about deleting your borrowing history once you return the book, and they don't target ads to you. But they're not immune to breakins.) Is there anything in their browsing history they wouldn't want their parents to see? Have they been to the doctor? Their medical history is online and available to any doctor anywhere, to their insurance company, and in part to drugstore personnel.

              +

              There are no right answers to these questions, whose purpose is to start students thinking about what information about them is on the net. They'll easily think of the things they post on purpose, such as their Facebook profile. (But they might not be aware of who can see that profile, which includes companies whose products they've "liked.") But have they ever bought anything online? If so, their name as addressee is probably connected with their parent's name as credit card holder. Have they borrowed a library book? Was it about politics, race, or sexuality? (Libraries are generally very good about deleting your borrowing history once you return the book, and they don't target ads to you. But they're not immune to breakins.) Is there anything in their browsing history they wouldn't want their parents to see? Have they been to the doctor? Their medical history is online and available to any doctor anywhere, to their insurance company, and in part to drugstore personnel.

            • @@ -76,7 +76,7 @@

              Lab 4: Protecting Your Privacy

              1. Possible responses about voluntarily giving up privacy are in the yellow hint box.
              2. -

                Risks range from embarassment to identity theft. For children, including teenagers, there is a special risk of abuse by strangers, either through kidnapping or through persuasiveness. Don't make that be the main topic of discussion, since it's much less likely than other risks. Identity theft may seen unrealistic to a teenager, who has no credit to steal, but once online, their information stays online forever.

                +

                Risks range from embarrassment to identity theft. For children, including teenagers, there is a special risk of abuse by strangers, either through kidnapping or through persuasiveness. Don't make that be the main topic of discussion, since it's much less likely than other risks. Identity theft may seen unrealistic to a teenager, who has no credit to steal, but once online, their information stays online forever.

                Ask students to imagine that 25 years from now they run for President. Is there anything on their Facebook page that opposing candidates could use to hurt their campaign? It'll still be accessible then.

                Here are some possible answers to problem 5, Who is threatening your privacy? @@ -120,53 +120,11 @@

                Optional Projects

              3. Page 2: Row of Houses
              4. Page 3: The Game of Pong
              5. Page 4: Daisy Design
              6. -
              7. Page 5: Modeling Language
    -
    -
    We need to decide what we are doing about...
    -

    Assignments

    -
    -
    This is from Lab 3, polygons
    -
      -
    • Submit (through whatever mechanism your class utilizes) a URL for a program that has a sprite that repeats the following until it touches the edge of the stage: move forward 100 units, then turn clockwise a random number of degrees from 90 to 150.
    • -
    • - Answer the multiple choice question: What will be the result of running the following code?
      - repeat (6){move (80); turn clockwise (60)} - -
        -
      1. A hexagon
      2. -
      3. A triangle
      4. -
      5. A square
      6. -
      7. A pentagon
      8. -
      -
    • -
    -
    -
    -
    This is from Lab 4, privacy
    -
      -
    • You may choose to assign this as optional reading: "Addicted to Apps (NY Times)"
    • -
    • Writing Prompts: -
        -
      • Write: Choose a good innovation and say why OK to give up privacy for it. And choose an innovation and say why we should be cautious of how much privacy we give up for it.
      • - -
      -
    • -
    -
    - -
    - -

    Assessment Ideas

    eCard Project

    diff --git a/cur/solutions-assessments/2-solutions-assessments.html b/cur/solutions-assessments/2-solutions-assessments.html index 151e19ad2f..41a43cc0ef 100644 --- a/cur/solutions-assessments/2-solutions-assessments.html +++ b/cur/solutions-assessments/2-solutions-assessments.html @@ -30,7 +30,6 @@

    Lab 1: Games

    Lab 2: Making Lists

      -
      Brian, Shopping list has a button that isn't used. It looks like we cut the TIF but didn't fix the starter file. Both the starter file and the solutions need to be fixed. --MF, 5/27/20
    • Page 1: Shopping List App
    • Pages 2–3 @@ -87,28 +86,8 @@

      Optional Projects

      Assessment Ideas

      -
      -

      Optional Formative Assessment for Lab 1

      -
      -
        -
      • -
        The presentation mode button (presentation mode button) toggles between showing only the stage and showing the normal Snap! interface.
        - Project this Snap! drawing project (without showing the code) and show how it behaves while running. Ask students to submit a URL for their own version of this program.
        - -
      • -
        I think this needs a description of what it is and how it functions as an assessment. Did you write it, Brian? --MF, 5/27/20
        -
      -
      -
      - -
      -
      Do we want this "project-based assessment" (scare quotes because it's not what I think of for a project based assessment)? If we kept it, I would just have them focus on one project. It would also need to be adapted to the new CT. Maybe we don't need it since we have a PCT now? It is a more-project-based assessment than the written one though... Thoughts? --MF, 5/27/20
      -

      Students choose their two best of projects from Unit 2, refine them as needed, and for each of them write a description according to these guidelines. In preparation for the AP Create Task, students describe the purpose of each of their programs, how to use them (in 100 words or less), and how they developed their programs (in 100 words or less), and they also write a description of the abstractions in each of their programs (in 100 words or less). In total, they should complete their two descriptions in 600 words or less.

      -
      - -

      Written Assessment Item Bank

      +
      We should consider whether to include a project-based assessment. --MF, 7/26/21
      +

      Written Assessment Item Bank

      Adapt this collection of assessment items to your needs. It includes several multiple choice questions similar to those on the AP CSP practice exam and several short-answer questions.

        @@ -127,15 +106,47 @@

        Written Assessment Item Bank

      • Move 2 to U3 Assessment, and move the RANDOM block into REPEAT and get rid of the variable.
      • Move 3 to U2 Assessment, and just have them pick the wrong one.
      • Drop 4.
      • -
      • Add a U2 assessment item: ""
      • -
      +

    +
    + We probably don't need this, but we built this (which can't actually go in the curriculum since it's paper-based): +
    +

    + There are problems about a robot in a grid with special procedures that don't exist in Snap!: +

      +
    • The
      MOVE_FORWARD ()
      moves the sprite forward one grid square. (You need to call it repeatedly to move more than one grid square.)
    • +
    • The
      ROTATE_LEFT ()
      or
      ROTATE_RIGHT ()
      blocks always turn exactly 90 degrees. (They are used only to move a robot in a grid.)
    • +
    • The
      CAN_MOVE (direction)
      block returns true or false depending on whether or not the robot can move in the input direction without running into a wall or walking off of the maze.
    • +
    + You can read more about these AP language procedures on the Snap! Cheat Sheet in the Robot section at the bottom. +

    +
    +
  • + A robot (arrow) is sitting in the middle of a 5×5 grid facing upwards. Shade all the squares in the grid that the robot cannot get to, if the given code is executed.
    + set (turns) to (pick random (2) to (3))
+repeat (turns) {
+	rotate right
+}
+set (steps) to (pick random (1) to (2))
+repeat (steps) {
+	move forward
+} + 5×5 grid of squares with an upward-facing sprite in the center square +
  • +

    The linked document has 4 questions that could be a good supplement to the materials learned in this Unit.

    diff --git a/cur/solutions-assessments/3-solutions-assessments.html b/cur/solutions-assessments/3-solutions-assessments.html index c62b515840..0a005c9a3f 100644 --- a/cur/solutions-assessments/3-solutions-assessments.html +++ b/cur/solutions-assessments/3-solutions-assessments.html @@ -238,66 +238,10 @@

    Optional Projects

  • Music Project
  • - - -
    -
    From Lab 2
    -

    Assignments

    -
    -
      -
    • Assessment Idea: Write a program that keeps track of each student's grade in one class. -
        -
      1. Create abstract data type to hold each student record: -
          -
        • - Create a student record constructor—a reporter block that, given a name (a text string) and grade (a number) as input, reports a student record (a list of that name and grade).
          - student record with name: (Alphie) grade: (87) reporting '{Alphie, 87}' -
        • -
        • - Create two selectors name and grade that, given a student record as input, report the name or grade for that student record.
          - name of (student record with name: (Alphie) grade: (87)) reporting 'Alphie' - grade of (student record with name: (Alphie) grade: (87)) reporting '87' -
        • -
        -
      2. -
      3. Make a variable class that, when the green flag is clicked, is set to an empty list that will store student records.
      4. -
      5. Add a button (sprite) that uses your constructor to allow the user to create a student record by entering the student’s name and grade.
      6. - -
      7. Add a button that generates a grade report. Use the for each block to go through each record in class and have the sprite say the student’s name and grade for a second. Format the output so that it makes sense to the user.
      8. -
      9. Submit your code in whatever way your class submits work.
      10. -
      -
    • -
    -
    -
    -
    -
    This was commented out of Lab 3. Do we want it at all? --MF, 5/27/20
    -

    Assignments:

    -
    -
      -
    • - Assessment Idea: Write a program that allows a user to enter words and definitions. -
        -
      1. - Create an abstract data type to hold each word definition: -
          -
        • Create a word definition constructor that accepts two inputs: the word and the definition (both as text strings).
        • -
        • Create two selectors word and definition.
        • -
        -
      2. -
      3. Create a variable called vocab list that is a list of words and their definitions and that initializes when the green flag is clicked.
      4. -
      5. Make a way for a user to enter a word and its definition. Use keep to determine whether a new word is already in the list of words and provide an error message to the user if it is.
      6. -
      7. Make a way for the user to read all the words included in the dictionary. Use map to make the sprite say all the words separated by commas.
      8. -
      9. Make a way for the user to look up the definition of a word in the vocab list.
      10. -
      11. Submit your code in whatever way your class submits work.
      12. -
      -
    • -
    -
    -
    +

    Assessment Ideas

    -
    MARY: These links all need title tags (and check future units too) --MF, 5/16/20
    +
    We should consider whether to include a project-based assessment. --MF, 7/26/21

    Brian, we've been pulling these pre-create task "assessments" since we have a practice create task now, but I'm leaving it here until we have a chance to discuss it. --MF, 6/7/20

    Tic Tac Toe Analysis of Abstractions

    diff --git a/cur/solutions-assessments/4-solutions-assessments.html b/cur/solutions-assessments/4-solutions-assessments.html index d3ca3d2adb..8df105c8c4 100644 --- a/cur/solutions-assessments/4-solutions-assessments.html +++ b/cur/solutions-assessments/4-solutions-assessments.html @@ -152,8 +152,8 @@

    Lab 4: Data Representation and Compression

  • Exercise 8 (If There Is Time):
      -
    • Working from the inside out, the translate text to binary sequence block uses translate text to Unicode list to get a list of the Unicode numbers for the characaters in the input string. The list is helpful because it is then used with the higher order function map to translate these into binary using the translate decimal to binary function. Next, map and pack 8-bit byte take that list adds enough zeros in front of each numeral to make a full byte. Then, list → word converts those bytes into a single string, join wraps quotes around the whole thing so that Snap!doesn't remove any leading zeros, and the quoted binary sequence is reported.
    • -
    • Working from the inside out, the translate binary sequence to text block uses split binary sequence into list of bytes to cut the binary sequence up into a list of bytes—one for each character. Map and translate binary to decimal then turn that into a list of Unicode values for each character. And then map and unicode as letter turn that into a list of charaters. Finally, list → word converts that into a text string, which is reported.
    • +
    • Working from the inside out, the translate text to binary sequence block uses translate text to Unicode list to get a list of the Unicode numbers for the characters in the input string. The list is helpful because it is then used with the higher order function map to translate these into binary using the translate decimal to binary function. Next, map and pack 8-bit byte take that list adds enough zeros in front of each numeral to make a full byte. Then, list → word converts those bytes into a single string, join wraps quotes around the whole thing so that Snap!doesn't remove any leading zeros, and the quoted binary sequence is reported.
    • +
    • Working from the inside out, the translate binary sequence to text block uses split binary sequence into list of bytes to cut the binary sequence up into a list of bytes—one for each character. Map and translate binary to decimal then turn that into a list of Unicode values for each character. And then map and unicode as letter turn that into a list of characters. Finally, list → word converts that into a text string, which is reported.
  • @@ -244,75 +244,8 @@

    Lab 4: Data Representation and Compression

    -
    -

    Assignments

    -
    -
    From OLD Lab 1 TG page. Do we want to keep this? --MF, 5/30/20
    -
      -
    • Assignment Idea: To help students solidify their understanding of address hierarchy, have them describe what it means that: -
        -
      • Street addresses are hierarchical.
      • -
      • Domain names are hierarchical.
      • -
      • IP addresses are hierarchical.
      • -
      -
    • -
    -
    -
    -
    From OLD Lab 1 (Was Lab 2 Communication Protocols) TG page. Do we want to keep this? --MF, 5/30/20
    -
      -
    • Assessment Idea: Draw a diagram showing some of the process and protocols involved in sending an HTTP request and receiving the response.
    • -
    • - Several pages in this lab suggest a brief reading from the Blown to Bits appendix in the "If There Is Time" sections: - -
    • -
    -
    -
    -
    From Lab 2 TG page. Do we want to keep this? --MF, 5/16/20
    -
      -
    • - Assessment Idea: -
        -
      • Describe a security attack and how cryptography helps protect against the attack.
      • -
      -
    • -
    -
    - -
    -
    From Lab 3 TG page. Do we want to keep this? --MF, 5/16/20
    -
      -
    • - In the Response to cyberbullying discussion Google doc, students have the choice to respond to one of two prompts: -
        -
      1. How did your understanding of cyberbullying change as a result of today's discussion? Explain your previous understanding, your current understanding, and specific moments of the discussion that helped change that understanding.
      2. -
      3. What are the most effective ways for schools to address the issue of cyberbullying? Explain your thinking, raise at least one possible objection someone might raise, and how you would respond to that objection.
      4. -
      -
    • -
    -
    - -
    -
    - From Lab 4 TG page. Do we want to keep this? --MF, 5/16/20 -

    Links and link text needs attention. --MF, 6/13/19

    -
    - -
    -
    - -

    Assessment Ideas

    +
    We should consider whether to include a project-based assessment. --MF, 7/26/21

    Written Assessment Item Bank

    Adapt this collection of assessment items to your needs. It includes several multiple choice questions similar to those on the AP CSP practice exam and several short-answer questions. @@ -323,10 +256,31 @@

    Written Assessment Item Bank

    -

    Assessment Options

    -
    MARY: These links all need title tags (and check future units too) --MF, 5/16/20
    -

    An alternative approach is a divide-and-conquer Collaborative Class Project. Each student, perhaps with a partner, will prepare a 5-minute presentation on a particular topic of interest, drawn from the AP CSP standards.

    -
    +

    + Add to Written Assessment Item Bank: +

      +
    • Describe a security attack and how cryptography helps protect against the attack.
    • +
    +

    +

    + Consider adding (cut from U6): +

      +
    • + One of the areas of the global impact of computing is the participation of ordinary citizens in solving important scientific problems. Give an example of this kind of citizen participation, and explain how innovations in computing is enabling such participation. +
        +
      • SAMPLE RESPONSE: SETI@home, in which idle computer time of the participant is used to analyze signals from outer space. Innovations in computing include distributed networks and parallel processing of computationally difficult problems.
      • +
      +
    • +
    • + Explain what is meant by the “Global Digital Divide” and discuss -with a social, cultural or economic example- how recent innovations in computing are positively and/or negatively impacting human communities across the world. +
        +
      • SAMPLE RESPONSE: "Global Digital Divide" is a term used to highlight the inequalities and discrepancies between the developed and developing countries of the world regarding access to resources and innovations in the field of computing (such as the Internet). Examples of positive/negative socio-economic-cultural global impact will vary. One way recent innovations in technology is impacting the world positively is how rural farmers are empowered by being able to find out retail prices in the city on their smartphones. One way recent innovations in technology is impacting the world negatively is the undermining of the democratic institutions by Russian hackers as seen during the 2016 US elections.
      • +
      +
    • +
    +

    + +
    diff --git a/cur/solutions-assessments/5-solutions-assessments.html b/cur/solutions-assessments/5-solutions-assessments.html index f61fe26488..66511ba768 100644 --- a/cur/solutions-assessments/5-solutions-assessments.html +++ b/cur/solutions-assessments/5-solutions-assessments.html @@ -126,7 +126,7 @@

    Lab 3: Turning Data into Information

  • -
    View the visualizer on the student page or google.com.
    +
    View the visualizer on the student page or google.com.
    • Exercise 1: @@ -301,66 +301,49 @@

      Lab 6: Tic-Tac-Toe

    • -
        -
      • -
      +
        +
      1. What do these blocks do? +
          +
        • Board is a variable containing a list of nine items, one for each square of the board, each of which is an X, an O, or the square's number if it's vacant.
        • +
        • Possible winning triples reports the same list every time it's called: eight items, each of which is a list of three numbers, representing three squares that form a vertical, horizontal, or diagonal line.
        • +
        • Status of all winning triples reports a list that's like the one from possible winning triples except that if a square is occupied, its square number is replaced by an X or O wherever it appears.
        • +
        • Won? takes a letter X or O as input, and reports True if and only if that player has won the game (has three squares in a row).
        • +
        +
      2. +
      3. Board is used to ask for the status (X, O, or vacant) of one individual square; status of all winning triples is used to ask whether any of the eight possible winning vertical, horizontal, or diagonal lines has some particular status (e.g., X has won, O can win on the next move, etc.).
      4. +
      5. Each square on the stage is covered by a sprite, which is initially a white square but changes its costume to X or O when played. When you click in a square, that one sprite runs its when I am clicked script. Each sprite knows which square it's in (using a sprite-local variable), so in addition to changing its costume, it can change its corresponding item in the board list.
      6. +
    • -
    • Page 2: Creating a Computer Player
    • -
    • Page 3: Developing a Gameplay Strategy
    • +
    • Page 2: Creating a Computer Player
    • +
    • Page 3: Developing a Gameplay Strategy
    • - Page 4: Making the Computer Play Strategically + Page 4: Making the Computer Play Strategically
    -
    -
    This had been commeted out on the Lab 1 TG. Do we want any of it? --MF, 5/31/20
    - These appear to reference only assignments from the student pages. --MF, 2/6/17 -

    Assignments

    -
    Needs attention --MF 2/1/17
    -
    -
      -
    • - Students create a U5L1-GuessNumber project, which includes two new blocks: -
        -
      • Number guessing game - player guesser where the computer picks the number and tells the player if their guesses are too high or too low
      • -
      • Number guessing game - computer guesser where the player picks the number and tells the computer if its guesses are too high or too low
      • -
      -
    • -
    • Students also develop a U5L1-ListSearch project, a list searching algorithm that finds a specific number in an ordered list of numbers and reports its position.
    • -
    -
    -
    - -
    - From Lab 3 TG page. Do we want to keep this? --MF, 5/16/20 -

    Assignments

    -
    We should revisit these. --MF, 6/26/19
    -
    -
      -
    • - You may wish to assign or work through these database questions as a class. Several questions like these have appeared on AP CSP practice exams. The answers to these two questions are: -
        -
      1. D: III and IV
      2. -
      3. C: I, II, and IV
      4. -
      -
    • -
    -
    -
    - -

    Assessment Ideas

    +
    We should consider whether to include a project-based assessment. --MF, 7/26/21
    -
    We need to decide if there is still a viable project in here for U5. --MF, 6/7/20
    -
    MARY: These links all need title tags (and check future units too) --MF, 5/16/20
    +
    Have Michelle take a Look at these --MF 7/26/21
    +
      +
    • + You may wish to assign or work through these database questions as a class. Several questions like these have appeared on AP CSP practice exams. The answers to these two questions are: +
        +
      1. D: III and IV
      2. +
      3. C: I, II, and IV
      4. +
      +
    • +
    +

    Reviewing Reasonable Vs. Unreasonable Time and Data Processing Project

    -
    This section still needs Y2 revision.

    Students revisit two projects: List Searching from Unit 5, Lab 1 and Tic-Tac-Toe from Unit 3, Lab 4, and write a descriptions of the algorithms they used (in preparation for the AP Create Task). This Unit 5 Assessment file includes student-facing instructions.

    +

    Students revisit two projects: List Searching from Unit 5, Lab 1 and Tic-Tac-Toe from Unit 3, Lab 4, and write a descriptions of the algorithms they used (in preparation for the AP Create Task). This Unit 5 Assessment file includes student-facing instructions.

    Written Assessment Item Bank

    diff --git a/cur/solutions-assessments/6-solutions-assessments.html b/cur/solutions-assessments/6-solutions-assessments.html index c33f9f2f10..74e89e726d 100644 --- a/cur/solutions-assessments/6-solutions-assessments.html +++ b/cur/solutions-assessments/6-solutions-assessments.html @@ -104,11 +104,12 @@

    Lab 2: History and Impact of Computers

  • Assessment Ideas

    +
    We should consider whether to include a project-based assessment. --MF, 7/26/21

    - On this written assessment, students recall core aspects of the computer abstraction hierarchy; convert among binary, decimal, and hexadecimal; and offer examples of Moore's Law and citizen participation in large-scale computing efforts: + On this written assessment, students recall core aspects of the computer abstraction hierarchy; convert between binary and decimal, and offer examples of Moore's Law:

    diff --git a/cur/solutions-assessments/7-solutions-assessments.html b/cur/solutions-assessments/7-solutions-assessments.html index 4b1ace7d94..46ec6ad651 100644 --- a/cur/solutions-assessments/7-solutions-assessments.html +++ b/cur/solutions-assessments/7-solutions-assessments.html @@ -39,7 +39,7 @@

    Lab 2: Recursion Projects

  • Exercise 9 (If There Is Time): The biggest problem with our algorithm is that Mondrian didn't only make lines that entirely divide an area into two pieces. He would, for example, draw a line that only partly divides the space. Here's an example:
    -
    Composition No. 10. 1939-42. Piet Mondrian. Oil on canvas. 80 x 73 cm. Private collection. Public domain. Via Wikimedia.
    +
    Composition No. 10. 1939-42. Piet Mondrian. Oil on canvas. 80 × 73 cm. Private collection. Public domain. Via Wikimedia.
    a Mondrian picture
    Look at the horizontal line that runs into the yellow box at the left. It crosses two verticals but stops at the third one. Also, that line is thinner than the horizontal lines above and below it. A better program would first put down lines, and then choose colors to fill some of the regions. It would also have a system for positioning the lines. In this picture there's a central rectangle with a small space to its left and two small spaces to its right, not counting the partial spaces that run off the ends of the canvas.
  • diff --git a/cur/specifications.html b/cur/specifications.html index e1fd8b8426..3178c92702 100644 --- a/cur/specifications.html +++ b/cur/specifications.html @@ -19,7 +19,7 @@

    Snap! Minimum Specifications

    10.1 
    Firefox 47 
    Edge12However, Microsoft browsers don't support data urls and thus don't allow you to export anything.
    Edge12However, Microsoft browsers don't support data URLs and thus don't allow you to export anything.
    Opera32 
    IE none
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Video TitleRelevant BJC Content
    Key to Success in BJCCurriculum Introduction
    Abstraction: WelcomeCurriculum Introduction
    Abstraction: Abstraction & Detail Removal2.4: Abstraction
    Abstraction: Generalization2.4: Abstraction
    Abstraction: Abstraction Interfaces and Summary2.4: Abstraction
    Functions: Function Basics1.3.3: Blocks with Inputs
    Functions: Data Types Domain & Range1.3.3: Blocks with Inputs
    Functions: Why Should You Use Functions?1.3.3: Blocks with Inputs
    Functions: Demo1.3.3: Blocks with Inputs
    Abstraction: Numbers6.2: Data Representation and Compression
    Abstraction: Base Conversion6.2: Data Representation and Compression, Unit 5: Algorithms and Simulations
    Abstraction: Power, LimitationsEnrichment, 2.4: Abstraction
    Creativity: IntroductionExplore and Create Tasks
    Creativity: Computational ArtifactsExplore and Create Tasks
    Creativity: Collaboration, Analysis, Power! Part 1Explore and Create Tasks
    Creativity: Collaboration, Analysis, Power! Part 2Explore and Create Tasks
    Programming ParadigmsEnrichment/Overview
    Programming Paradigms: Object-Oriented ProgrammingEnrichment/Overview
    Programming Paradigms: Sketchpad DemoEnrichment/Overview
    Programming Paradigms: Declarative ProgrammingEnrichment/Overview
    You Finished BJC.1x! 
    Video TitleRelevant BJC Content
    Introduction to BJC.2x 
    Algorithms: DefinitionsUnit 5: Algorithms and Simulations
    Algorithms: PropertiesUnit 5: Algorithms and Simulations
    Algorithms: ExpressingUnit 5: Algorithms and Simulations
    Algorithms: Turing CompletenessUnit 5: Algorithms and Simulations
    Algorithms: SpecificationsUnit 5: Algorithms and Simulations
    Algorithms: Analysis Part 1Unit 5: Algorithms and Simulations, 5.3: Timing Experiments
    Algorithms: Analysis Part 2Unit 5: Algorithms and Simulations
    Algorithms: Correctness, SummaryUnit 5: Algorithms and Simulations
    Global Impact: Communication, Interaction and Cognition Part 16.3.3: Global Impact of Computing
    Global Impact: Communication, Interaction and Cognition Part 26.3.3: Global Impact of Computing
    Global Impact: Citizen Participation Part 16.3.3: Global Impact of Computing
    Global Impact: Citizen Participation Part 26.3.3: Global Impact of Computing
    Global Impact: Computers and Education6.3.3: Global Impact of Computing
    Global Impact: Computing Enables Innovation6.3.3: Global Impact of Computing
    Global Impact: Economic, Social, Cultural Contexts6.3.3: Global Impact of Computing
    Global Impact: Intellectual Property6.3.3: Global Impact of Computing, 2.5: Copyright
    Global Impact III: Principle 16.3.3: Global Impact of Computing
    Global Impact III: Principle 26.3.3: Global Impact of Computing
    Global Impact III: Principle 36.3.3: Global Impact of Computing
    Global Impact III: Principle 4, 5, 66.3.3: Global Impact of Computing
    Global Impact III: Principle 7, 8, 9, 106.3.3: Global Impact of Computing
    You Finished BJC.2x! 
    Video TitleRelevant BJC Content
    Introduction to BJC.3x 
    Data: Data and Information Part 1Unit 3: Data Processing and Lists
    Data: Data and Information Part 2Unit 3: Data Processing and Lists
    Data: Data and Information Part 3Unit 3: Data Processing and Lists
    Data: Big Data, Compression, MetadataUnit 3: Data Processing and Lists
    Data: MetadataUnit 3: Data Processing and Lists
    Limits of Computing: Introduction to Complexity TheoryUnit 5: Algorithms and Simulations
    Limits of Computing: Heuristics, NP, NP-Hard, NP-Complete Part 1Unit 5: Algorithms and Simulations, 5.4: Unsolvable and Undecidable Problems
    Limits of Computing: Heuristics, NP, NP-Hard, NP-Complete Part 2Unit 5: Algorithms and Simulations, 5.4: Unsolvable and Undecidable Problems
    Limits of Computing: Decidability Part 15.4: Unsolvable and Undecidable Problems
    Limits of Computing: Decidability Part 25.4: Unsolvable and Undecidable Problems
    Kathy Yelick - Saving the World with Computing Part 1Enrichment/Overview
    Kathy Yelick - Saving the World with Computing Part 2Enrichment/Overview
    Kathy Yelick - Saving the World with Computing Part 3Enrichment/Overview
    Kathy Yelick - Saving the World with Computing Part 4Enrichment/Overview
    Kathy Yelick - Saving the World with Computing Part 5Enrichment/Overview
    You Finished BJC.3x! 
    Video TitleRelevant BJC Content
    Introduction to BJC.4x 
    Recursion: Vee DemoUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: Downup DemoUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: Definition, You Know It, Trust ItUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: FactorialUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: Factorial DemoUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: FibonacciUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: Fibonacci and the Golden MeanUnit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: Count Change Part 1Unit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    Recursion: Count Change Part 2Unit 7: Trees and Other Fractals, Unit 8: Recursive and Higher-Order Functions
    HOFs: Why? Basics Part 1Unit 8: Recursive and Higher-Order Functions
    HOFs: Why? Basics Part 2Unit 8: Recursive and Higher-Order Functions
    HOFs: AcronymUnit 8: Recursive and Higher-Order Functions
    HOFs: Tools and Demo Part 1Unit 8: Recursive and Higher-Order Functions
    HOFs: Tools and Demo Part 2Unit 8: Recursive and Higher-Order Functions
    Artificial Intelligence Part 13.3: Robots and Artificial Intelligence
    Artificial Intelligence Part 23.3: Robots and Artificial Intelligence
    Artificial Intelligence Part 33.3: Robots and Artificial Intelligence
    Artificial Intelligence Part 43.3: Robots and Artificial Intelligence
    Artificial Intelligence Part 53.3: Robots and Artificial Intelligence
    Human Computer Interaction Part 1Enrichment/Overview, Explore and Create Tasks
    Human Computer Interaction Part 2Enrichment/Overview, Explore and Create Tasks
    Human Computer Interaction Part 3Enrichment/Overview, Explore and Create Tasks
    Human Computer Interaction Part 4Enrichment/Overview, Explore and Create Tasks
    Human Computer Interaction Part 5Enrichment/Overview, Explore and Create Tasks
    You finished BJC.4x!Unit 8: Recursive and Higher-Order Functions, Curriculum Closure
    - - - - diff --git a/cur/updates.html b/cur/updates.html index c31252f902..1cbc307e7e 100644 --- a/cur/updates.html +++ b/cur/updates.html @@ -13,7 +13,9 @@

    Development Updates

    The overall structure of the lab (apart from page 1, which just introduces the idea of pair programming) is

    -

    This organization peels away levels of abstraction, from black box procedures to editable procedures to the ability to create new procedures. Not all labs follow this pattern, but when reading a lab, work out what pattern it does have.

    +

    This organization peels away levels of abstraction, from opaque box procedures to editable procedures to the ability to create new procedures. Not all labs follow this pattern, but when reading a lab, work out what pattern it does have.

    Page 1.2.4 unavoidably starts with a bunch of explanation about how to start building a block, but that text is embedded in an exercise in which students are building a particular block, so it feels like helping them past the details rather than feeling like arbitrary stuff they have to memorize.

    It's hard for teachers not to jump in with explanations. In BJC professional development we work hard on persuading teachers not to teach—that is, not to stand in front of the room explaining. It's just as hard for curriculum writers! But as you're editing your work, when you see a big pile of text, ask yourself "isn't there an activity that could make this point?"

    (By the way, Unit 1 Lab 1 is a special case, because it’s not trying to teach how the program works; its goal is to get a finished game on the kids’ phones in the first class session, so they go home psyched.  So don’t use it as an example of good curriculum writing.)

    @@ -110,7 +110,7 @@

    2. Don't over-scaffold.

    Hints about building the divisors block
    @@ -148,7 +148,34 @@

    3. We are telling a story.

    It's ironic that so many high school computer science teachers are so enthusiastic about teaching about binary numerals; no working computer programmer ever deals with binary! Computer science isn't about binary; it's about all the abstractions that stand between the human programmer and binary. It's electrical engineers, the people who design the actual computer hardware, who think about binary.

    Functional programming is a style of programming based on the computation of functions. A function takes some number of inputs and reports a result; the result depends only on the input values, not on any previous computation.

    4. Emphasize social implications.

    +

    I lied; we're telling three stories. The third one is that it very much matters what people do with computers. Are you writing curriculum about robots? Be sure to integrate study of the effect of automation on jobs, and study of drones as weapons, in with the technical labs. Don't leave it for the end of the course. (Actually both of these topics are already in BJC, but you might think about moving them closer to relevant technical topics.) Here are some of the main points of this story:

    +

    5. Use functional programming where possible.

    +

    This is one of the ways in which BJC is better than the College Board's CSP Framework. Instead of thinking of a program as a sequence of steps, we try to think of it as a composition of functions. So, instead of
    +set (contact) to (item 3 of contact-list); set (name) to (name from contact (contact)); say (name) for 2 secs
    +we would write
    +say (name from contact (item 3 of contact-list)) for 2 secs +

    Functional programming is more powerful than sequential programming, in part because a function you write can be used as a helper in a larger computation. Compare these:

    +script variables (number); ask +    +define square of (number): report (number * number) +

    Especially for kids who've programmed before, the first of these may look like a "real program," while the second seems so trivial as to be "cheating." But what if I want to know 34? With the functional version I can say
    +(square of (square of (3))) reporting 81 +

    But with the sequential version, I'm out of luck.

    +

    Some people find composition confusing because the expression is evaluated from the inside out. If you're one of those, we provide an alternate notation (in the "iteration, composition" library) in which the procedure calls appear in the order in which they're evaluated:
    +pipe 3 -> square of () -> 2 * (), reports 18 +    +pipe 3 -> (2 * ()) -> (square of ()), reports 36

    +

    Two other reasons why functional programming is important, not so obvious in the toy problems of the programming labs, is that it helps prevent bugs (by avoiding changing the value of a variable, so one piece of the program can't step on a value that another part still needs) and that the advent of parallelism in computer hardware is much easier to put to use when each of a bunch of expressions can be evaluated without reference to any other of them.

    +

    We aren't fanatical about it, though. Even drawing pictures can be done functionally; a picture is built up as a data structure full of line segments, and when a picture function is called at toplevel, the result is the picture, shown on the stage. But that's not the natural way to draw pictures, and we use the graphics projects as an opportunity to show students how sequential programs work.

    +

    But even then, we try to avoid changing the value of a variable, and when we must, we provide abstractions over the reassignment, such as the for and for each blocks.

    6. Be careful about the use of the word "optional."

    In every unit there is a collection of "optional projects" after the numbered labs. These are optional in the sense that they are not essential to telling our story. Students who want to do more programming than we're requiring of them are encouraged to take up some of these suggested projects. Note that some of these are former BJC labs that became redundant as the curriculum evolved, but that many teachers love. So some teachers will assign some of these projects, in which case they're optional for the teacher but no longer optional for the student.

    Apart from those, nothing in the curriculum is optional, not for students and not for teachers either. Saying that in a more positive way, every page of every lab teaches something we consider important. There's no busywork. (Within a page, If There Is Time and Take It Further sections are optional.) Having said that, teachers new to BJC often report that they have trouble fitting everything into the school year, and in the Teacher's Guide we give them guidance about the least harmful labs to omit. Teachers loosely refer to these labs as "optional," but that shouldn't be our attitude toward them, and in particular there should be no hint of optionality in student-facing materials.

    diff --git a/img/1-introduction/2x-square-3.png b/img/1-introduction/2x-square-3.png new file mode 100644 index 0000000000..b817e8c254 Binary files /dev/null and b/img/1-introduction/2x-square-3.png differ diff --git a/img/1-introduction/3-to-the-4.png b/img/1-introduction/3-to-the-4.png new file mode 100644 index 0000000000..5fb98c0dfe Binary files /dev/null and b/img/1-introduction/3-to-the-4.png differ diff --git a/img/1-introduction/GraphicArt_img/alma-big.jpg b/img/1-introduction/GraphicArt_img/alma-big.jpg new file mode 100644 index 0000000000..b2a512fc18 Binary files /dev/null and b/img/1-introduction/GraphicArt_img/alma-big.jpg differ diff --git a/img/1-introduction/functional-name.png b/img/1-introduction/functional-name.png new file mode 100644 index 0000000000..0a970b0d72 Binary files /dev/null and b/img/1-introduction/functional-name.png differ diff --git a/img/1-introduction/functional-square.png b/img/1-introduction/functional-square.png new file mode 100644 index 0000000000..15299e6e0f Binary files /dev/null and b/img/1-introduction/functional-square.png differ diff --git a/img/1-introduction/sequential-name.png b/img/1-introduction/sequential-name.png new file mode 100644 index 0000000000..c38201f404 Binary files /dev/null and b/img/1-introduction/sequential-name.png differ diff --git a/img/1-introduction/sequential-square.png b/img/1-introduction/sequential-square.png new file mode 100644 index 0000000000..069fe4c346 Binary files /dev/null and b/img/1-introduction/sequential-square.png differ diff --git a/img/1-introduction/square-2x3.png b/img/1-introduction/square-2x3.png new file mode 100644 index 0000000000..59fada0540 Binary files /dev/null and b/img/1-introduction/square-2x3.png differ diff --git a/img/2-complexity/plural-abstract-definition.png b/img/2-complexity/plural-abstract-definition.png index a0d6100920..8d2a5ec07e 100644 Binary files a/img/2-complexity/plural-abstract-definition.png and b/img/2-complexity/plural-abstract-definition.png differ diff --git a/img/3-lists/check1capitalsc4.png b/img/3-lists/check1capitalsc4.png index d2ce294864..ec7cf46e4f 100644 Binary files a/img/3-lists/check1capitalsc4.png and b/img/3-lists/check1capitalsc4.png differ diff --git a/img/3-lists/check1capitalsc6.png b/img/3-lists/check1capitalsc6.png new file mode 100644 index 0000000000..7e4a85c52c Binary files /dev/null and b/img/3-lists/check1capitalsc6.png differ diff --git a/img/3-lists/check1capitalsc7.png b/img/3-lists/check1capitalsc7.png new file mode 100644 index 0000000000..60e1331a1e Binary files /dev/null and b/img/3-lists/check1capitalsc7.png differ diff --git a/img/3-lists/check1capitalsc8.png b/img/3-lists/check1capitalsc8.png new file mode 100644 index 0000000000..ed781dc7f4 Binary files /dev/null and b/img/3-lists/check1capitalsc8.png differ diff --git a/img/3-lists/check2squares1c1.png b/img/3-lists/check2squares1c1.png index 9f37e1023f..de8da73594 100644 Binary files a/img/3-lists/check2squares1c1.png and b/img/3-lists/check2squares1c1.png differ diff --git a/img/3-lists/check2squares1c7.png b/img/3-lists/check2squares1c7.png index 3db48b3d9f..a6d2f0b341 100644 Binary files a/img/3-lists/check2squares1c7.png and b/img/3-lists/check2squares1c7.png differ diff --git a/img/3-lists/in-front-of.png b/img/3-lists/in-front-of.png deleted file mode 100644 index f54dd3f88b..0000000000 Binary files a/img/3-lists/in-front-of.png and /dev/null differ diff --git a/img/3-lists/item-1-of.png b/img/3-lists/item-1-of.png deleted file mode 100644 index 22a846e5db..0000000000 Binary files a/img/3-lists/item-1-of.png and /dev/null differ diff --git a/img/3-lists/map-3x.png b/img/3-lists/map-3x.png index 2e9901ed84..b1970a3e3a 100644 Binary files a/img/3-lists/map-3x.png and b/img/3-lists/map-3x.png differ diff --git a/img/3-lists/map-example-1.png b/img/3-lists/map-example-1.png index 538105cfdc..0f862a1f65 100644 Binary files a/img/3-lists/map-example-1.png and b/img/3-lists/map-example-1.png differ diff --git a/img/3-lists/map-example-2.png b/img/3-lists/map-example-2.png index 68c902d8ed..b766a6ed81 100644 Binary files a/img/3-lists/map-example-2.png and b/img/3-lists/map-example-2.png differ diff --git a/img/3-lists/map-example-3.png b/img/3-lists/map-example-3.png index 4ade3b606e..e74bc82c0e 100644 Binary files a/img/3-lists/map-example-3.png and b/img/3-lists/map-example-3.png differ diff --git a/img/3-lists/map-join-s.png b/img/3-lists/map-join-s.png index 321cd00d55..b5e29adb97 100644 Binary files a/img/3-lists/map-join-s.png and b/img/3-lists/map-join-s.png differ diff --git a/img/3-lists/map-letter-1.png b/img/3-lists/map-letter-1.png index 2e03443507..1e66858d13 100644 Binary files a/img/3-lists/map-letter-1.png and b/img/3-lists/map-letter-1.png differ diff --git a/img/3-lists/robot-question-1-grid-solution.png b/img/3-lists/robot-question-1-grid-solution.png new file mode 100644 index 0000000000..bd18fab97b Binary files /dev/null and b/img/3-lists/robot-question-1-grid-solution.png differ diff --git a/img/3-lists/robot-question-1-grid.png b/img/3-lists/robot-question-1-grid.png new file mode 100644 index 0000000000..fe7b8663a8 Binary files /dev/null and b/img/3-lists/robot-question-1-grid.png differ diff --git a/img/3-lists/robot-question-1.png b/img/3-lists/robot-question-1.png new file mode 100644 index 0000000000..3012d55ef0 Binary files /dev/null and b/img/3-lists/robot-question-1.png differ diff --git a/img/3-lists/robot-question-2.png b/img/3-lists/robot-question-2.png new file mode 100644 index 0000000000..2a76767c06 Binary files /dev/null and b/img/3-lists/robot-question-2.png differ diff --git a/img/3-lists/status-of-triple.png b/img/3-lists/status-of-triple.png index e3c862fc7d..f54e3e16b6 100644 Binary files a/img/3-lists/status-of-triple.png and b/img/3-lists/status-of-triple.png differ diff --git a/img/5-algorithms/Control.png b/img/5-algorithms/Control.png new file mode 100644 index 0000000000..b7c733ae87 Binary files /dev/null and b/img/5-algorithms/Control.png differ diff --git a/img/5-algorithms/Lists.png b/img/5-algorithms/Lists.png new file mode 100644 index 0000000000..9c07baa379 Binary files /dev/null and b/img/5-algorithms/Lists.png differ diff --git a/img/5-algorithms/Operators.png b/img/5-algorithms/Operators.png new file mode 100644 index 0000000000..0cf7b83ac1 Binary files /dev/null and b/img/5-algorithms/Operators.png differ diff --git a/img/5-algorithms/Sensing.png b/img/5-algorithms/Sensing.png new file mode 100644 index 0000000000..7257baf25b Binary files /dev/null and b/img/5-algorithms/Sensing.png differ diff --git a/img/5-algorithms/Variables.png b/img/5-algorithms/Variables.png new file mode 100644 index 0000000000..6a39e93b62 Binary files /dev/null and b/img/5-algorithms/Variables.png differ diff --git a/img/5-algorithms/and.png b/img/5-algorithms/and.png new file mode 100644 index 0000000000..bf516089c6 Binary files /dev/null and b/img/5-algorithms/and.png differ diff --git a/img/5-algorithms/append.png b/img/5-algorithms/append.png new file mode 100644 index 0000000000..63c9c0fc71 Binary files /dev/null and b/img/5-algorithms/append.png differ diff --git a/img/5-algorithms/average-of-disease-spread.png b/img/5-algorithms/average-of-disease-spread.png index 2659b75cee..a448f53023 100644 Binary files a/img/5-algorithms/average-of-disease-spread.png and b/img/5-algorithms/average-of-disease-spread.png differ diff --git a/img/5-algorithms/bf.png b/img/5-algorithms/bf.png new file mode 100644 index 0000000000..0463990c8a Binary files /dev/null and b/img/5-algorithms/bf.png differ diff --git a/img/5-algorithms/change.png b/img/5-algorithms/change.png new file mode 100644 index 0000000000..a5a2c8b586 Binary files /dev/null and b/img/5-algorithms/change.png differ diff --git a/img/5-algorithms/command-ring.png b/img/5-algorithms/command-ring.png new file mode 100644 index 0000000000..48d12de764 Binary files /dev/null and b/img/5-algorithms/command-ring.png differ diff --git a/img/5-algorithms/fib.png b/img/5-algorithms/fib.png new file mode 100644 index 0000000000..ee7ec3cba8 Binary files /dev/null and b/img/5-algorithms/fib.png differ diff --git a/img/5-algorithms/for.png b/img/5-algorithms/for.png new file mode 100644 index 0000000000..31acf132a7 Binary files /dev/null and b/img/5-algorithms/for.png differ diff --git a/img/5-algorithms/foreach.png b/img/5-algorithms/foreach.png new file mode 100644 index 0000000000..d2dce68341 Binary files /dev/null and b/img/5-algorithms/foreach.png differ diff --git a/img/5-algorithms/function-ring.png b/img/5-algorithms/function-ring.png new file mode 100644 index 0000000000..6137d30ec4 Binary files /dev/null and b/img/5-algorithms/function-ring.png differ diff --git a/img/5-algorithms/if-else.png b/img/5-algorithms/if-else.png new file mode 100644 index 0000000000..2346175575 Binary files /dev/null and b/img/5-algorithms/if-else.png differ diff --git a/img/5-algorithms/img_disease-spread/disease-spread.gif b/img/5-algorithms/img_disease-spread/disease-spread.gif index 292613d645..268c70661b 100644 Binary files a/img/5-algorithms/img_disease-spread/disease-spread.gif and b/img/5-algorithms/img_disease-spread/disease-spread.gif differ diff --git a/img/5-algorithms/img_disease-spread/sick.png b/img/5-algorithms/img_disease-spread/sick.png new file mode 100644 index 0000000000..0ea8665c70 Binary files /dev/null and b/img/5-algorithms/img_disease-spread/sick.png differ diff --git a/img/5-algorithms/img_disease-spread/well.png b/img/5-algorithms/img_disease-spread/well.png new file mode 100644 index 0000000000..3635cdc8e6 Binary files /dev/null and b/img/5-algorithms/img_disease-spread/well.png differ diff --git a/img/5-algorithms/interval3-Stage.png b/img/5-algorithms/interval3-Stage.png index b7f319fc25..43b174dda7 100644 Binary files a/img/5-algorithms/interval3-Stage.png and b/img/5-algorithms/interval3-Stage.png differ diff --git a/img/5-algorithms/interval6-Stage.png b/img/5-algorithms/interval6-Stage.png index 79f2aeacd8..1a2812e0f4 100644 Binary files a/img/5-algorithms/interval6-Stage.png and b/img/5-algorithms/interval6-Stage.png differ diff --git a/img/5-algorithms/item.png b/img/5-algorithms/item.png new file mode 100644 index 0000000000..382c4cf324 Binary files /dev/null and b/img/5-algorithms/item.png differ diff --git a/img/5-algorithms/join.png b/img/5-algorithms/join.png new file mode 100644 index 0000000000..de7761c6b0 Binary files /dev/null and b/img/5-algorithms/join.png differ diff --git a/img/5-algorithms/list.png b/img/5-algorithms/list.png new file mode 100644 index 0000000000..ad0d42e4c3 Binary files /dev/null and b/img/5-algorithms/list.png differ diff --git a/img/5-algorithms/map.png b/img/5-algorithms/map.png new file mode 100644 index 0000000000..7a110adc79 Binary files /dev/null and b/img/5-algorithms/map.png differ diff --git a/img/5-algorithms/my-self.png b/img/5-algorithms/my-self.png new file mode 100644 index 0000000000..85056a7472 Binary files /dev/null and b/img/5-algorithms/my-self.png differ diff --git a/img/5-algorithms/obj-myself.png b/img/5-algorithms/obj-myself.png new file mode 100644 index 0000000000..1c55613d58 Binary files /dev/null and b/img/5-algorithms/obj-myself.png differ diff --git a/img/5-algorithms/plot-cars-histogram-stage.png b/img/5-algorithms/plot-cars-histogram-stage.png index 661f1d5c2e..b164042469 100644 Binary files a/img/5-algorithms/plot-cars-histogram-stage.png and b/img/5-algorithms/plot-cars-histogram-stage.png differ diff --git a/img/5-algorithms/plus-first.png b/img/5-algorithms/plus-first.png new file mode 100644 index 0000000000..a8b04fbf20 Binary files /dev/null and b/img/5-algorithms/plus-first.png differ diff --git a/img/5-algorithms/power.png b/img/5-algorithms/power.png new file mode 100644 index 0000000000..baba43b0ec Binary files /dev/null and b/img/5-algorithms/power.png differ diff --git a/img/5-algorithms/repeat-until.png b/img/5-algorithms/repeat-until.png new file mode 100644 index 0000000000..c4f4b2f526 Binary files /dev/null and b/img/5-algorithms/repeat-until.png differ diff --git a/img/5-algorithms/report.png b/img/5-algorithms/report.png new file mode 100644 index 0000000000..cc4e98b043 Binary files /dev/null and b/img/5-algorithms/report.png differ diff --git a/img/5-algorithms/reporter-if.png b/img/5-algorithms/reporter-if.png new file mode 100644 index 0000000000..c2f4a1450b Binary files /dev/null and b/img/5-algorithms/reporter-if.png differ diff --git a/img/5-algorithms/search2.png b/img/5-algorithms/search2.png new file mode 100644 index 0000000000..6b3bbe52e7 Binary files /dev/null and b/img/5-algorithms/search2.png differ diff --git a/img/5-algorithms/search4.png b/img/5-algorithms/search4.png new file mode 100644 index 0000000000..958c329a06 Binary files /dev/null and b/img/5-algorithms/search4.png differ diff --git a/img/5-algorithms/set.png b/img/5-algorithms/set.png new file mode 100644 index 0000000000..8f69ff17e0 Binary files /dev/null and b/img/5-algorithms/set.png differ diff --git a/img/5-algorithms/stop-block.png b/img/5-algorithms/stop-block.png new file mode 100644 index 0000000000..9e7b4d8b2f Binary files /dev/null and b/img/5-algorithms/stop-block.png differ diff --git a/img/5-algorithms/times-first.png b/img/5-algorithms/times-first.png new file mode 100644 index 0000000000..6175fecadd Binary files /dev/null and b/img/5-algorithms/times-first.png differ diff --git a/img/5-algorithms/times.png b/img/5-algorithms/times.png new file mode 100644 index 0000000000..3e9c7a5399 Binary files /dev/null and b/img/5-algorithms/times.png differ diff --git a/img/5-algorithms/x-is-3.png b/img/5-algorithms/x-is-3.png new file mode 100644 index 0000000000..b2886396cd Binary files /dev/null and b/img/5-algorithms/x-is-3.png differ diff --git a/img/6-computers/libraries-words.png b/img/6-computers/libraries-words.png index 6100d8e88e..941caffa9a 100644 Binary files a/img/6-computers/libraries-words.png and b/img/6-computers/libraries-words.png differ diff --git a/img/8-recursive-reporters/exaggerate.png b/img/8-recursive-reporters/exaggerate.png index 189ac725f8..9ca470ed2a 100644 Binary files a/img/8-recursive-reporters/exaggerate.png and b/img/8-recursive-reporters/exaggerate.png differ diff --git a/img/blocks/all-but-first-full-size.png b/img/blocks/all-but-first-full-size.png deleted file mode 100644 index caf68c7bce..0000000000 Binary files a/img/blocks/all-but-first-full-size.png and /dev/null differ diff --git a/img/blocks/all-but-first.png b/img/blocks/all-but-first.png index ccf0677686..42b5452b62 100644 Binary files a/img/blocks/all-but-first.png and b/img/blocks/all-but-first.png differ diff --git a/img/blocks/combine-new.png b/img/blocks/combine-new.png deleted file mode 100644 index f08b12bd35..0000000000 Binary files a/img/blocks/combine-new.png and /dev/null differ diff --git a/img/blocks/combine-using.png b/img/blocks/combine-using.png deleted file mode 100644 index 98d4d6aaf5..0000000000 Binary files a/img/blocks/combine-using.png and /dev/null differ diff --git a/img/blocks/combine.png b/img/blocks/combine.png index 804f2ddb7f..98d4d6aaf5 100644 Binary files a/img/blocks/combine.png and b/img/blocks/combine.png differ diff --git a/img/blocks/contains-empty.png b/img/blocks/contains-empty.png index f077297abc..a6567b20a5 100644 Binary files a/img/blocks/contains-empty.png and b/img/blocks/contains-empty.png differ diff --git a/img/blocks/empty.png b/img/blocks/empty.png index 867b218111..8d1825c942 100644 Binary files a/img/blocks/empty.png and b/img/blocks/empty.png differ diff --git a/img/blocks/in-front-of.png b/img/blocks/in-front-of.png index 1b2c6e806a..f13fe84126 100644 Binary files a/img/blocks/in-front-of.png and b/img/blocks/in-front-of.png differ diff --git a/img/blocks/item-blank-input.png b/img/blocks/item-blank-input.png deleted file mode 100644 index 1b485fdb32..0000000000 Binary files a/img/blocks/item-blank-input.png and /dev/null differ diff --git a/img/blocks/item-empty-full-size.png b/img/blocks/item-empty-full-size.png deleted file mode 100644 index e032856003..0000000000 Binary files a/img/blocks/item-empty-full-size.png and /dev/null differ diff --git a/img/blocks/keep-new.png b/img/blocks/keep-new.png deleted file mode 100644 index b0764bb365..0000000000 Binary files a/img/blocks/keep-new.png and /dev/null differ diff --git a/img/blocks/keep.png b/img/blocks/keep.png index 1a4a160f0c..b0764bb365 100644 Binary files a/img/blocks/keep.png and b/img/blocks/keep.png differ diff --git a/img/blocks/key-space-pressed-full-size.png b/img/blocks/key-space-pressed-full-size.png deleted file mode 100644 index 777bd39f8e..0000000000 Binary files a/img/blocks/key-space-pressed-full-size.png and /dev/null differ diff --git a/img/blocks/key-space-pressed.png b/img/blocks/key-space-pressed.png index 27b2b9d652..777bd39f8e 100644 Binary files a/img/blocks/key-space-pressed.png and b/img/blocks/key-space-pressed.png differ diff --git a/img/blocks/length-list-big.png b/img/blocks/length-list-big.png deleted file mode 100644 index 454fa45d30..0000000000 Binary files a/img/blocks/length-list-big.png and /dev/null differ diff --git a/img/blocks/length-of-blank-operator.png b/img/blocks/length-of-blank-operator.png index ad7b696020..b7cd1ab7ce 100644 Binary files a/img/blocks/length-of-blank-operator.png and b/img/blocks/length-of-blank-operator.png differ diff --git a/img/blocks/length-of-world.png b/img/blocks/length-of-world.png index f332290176..942849966e 100644 Binary files a/img/blocks/length-of-world.png and b/img/blocks/length-of-world.png differ diff --git a/img/blocks/map-new.png b/img/blocks/map-new.png deleted file mode 100644 index b2e67f8159..0000000000 Binary files a/img/blocks/map-new.png and /dev/null differ diff --git a/img/blocks/map.png b/img/blocks/map.png index 609150cbd4..b2e67f8159 100644 Binary files a/img/blocks/map.png and b/img/blocks/map.png differ diff --git a/img/blocks/replace.png b/img/blocks/replace.png index 966f350a38..9676197768 100644 Binary files a/img/blocks/replace.png and b/img/blocks/replace.png differ diff --git a/img/hof/ttt-flatten.png b/img/hof/ttt-flatten.png old mode 100755 new mode 100644 index 3cf063ee93..b660e43a11 Binary files a/img/hof/ttt-flatten.png and b/img/hof/ttt-flatten.png differ diff --git a/index.html b/index.html index f7cf6c01a0..17f4368b14 100644 --- a/index.html +++ b/index.html @@ -48,7 +48,7 @@

    The Beauty and Joy of ComputingAn AP CS Principles Cu