diff --git a/Gemfile.lock b/Gemfile.lock index b920e8339b..6559fc9a3d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,22 +54,22 @@ GEM ffi (1.17.0-x86_64-linux-gnu) ffi (1.17.0-x86_64-linux-musl) forwardable-extended (2.6.0) - google-protobuf (4.27.1) + google-protobuf (4.27.5) bigdecimal rake (>= 13) - google-protobuf (4.27.1-aarch64-linux) + google-protobuf (4.27.5-aarch64-linux) bigdecimal rake (>= 13) - google-protobuf (4.27.1-arm64-darwin) + google-protobuf (4.27.5-arm64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.1-x86-linux) + google-protobuf (4.27.5-x86-linux) bigdecimal rake (>= 13) - google-protobuf (4.27.1-x86_64-darwin) + google-protobuf (4.27.5-x86_64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.1-x86_64-linux) + google-protobuf (4.27.5-x86_64-linux) bigdecimal rake (>= 13) http_parser.rb (0.8.0) @@ -138,7 +138,7 @@ GEM rb-inotify (0.11.1) ffi (~> 1.0) regexp_parser (2.9.2) - rexml (3.3.2) + rexml (3.3.3) strscan rouge (4.3.0) rspec (3.13.0) diff --git a/cur/programming/1-introduction/3-drawing/1-exploring-motion.es.html b/cur/programming/1-introduction/3-drawing/1-exploring-motion.es.html index 249dd06b60..d3e088da58 100644 --- a/cur/programming/1-introduction/3-drawing/1-exploring-motion.es.html +++ b/cur/programming/1-introduction/3-drawing/1-exploring-motion.es.html @@ -147,25 +147,25 @@

Usar pasos visibles

En la paleta "Lápiz" se puede encontrar ahora el bloque fijar color de lápiz a. Las computadoras pueden desplegar millones de colores, pero a menos que sea necesario hacer coincidir exáctamente con un color en específico, no hace falta complicarse por hacerlo coincidir a menos que tengas la combinación correcta. La biblioteca de colores fuciona como una caja de crayones, brinda una selección de los colores más utilizados y se encuentran clasificados en familias. De esta forma si deseas incluir una variedad de tonos marrones, selecciona un número entre 30 y 39.
bloque de fijar el color del lápiz con la opción de "marrones" seleccionada y que muestra un submenú donde se selecciona la opcón "34 chestnut #954535" -
  • -  pintura de Malevich +
  • +  pintura de Malevich En el lado derecho se presenta una pintura del artista Kazimir Malevich. Los elementos en la pintura son rectángulos, tanto de forma horizontal como en un ángulo de 45 grados, en ocasiones unos grados más y otras unos grados menos. Se pueden posicionar los rectángulos de forma aleatoria. El resultado de tu trabajo no necesariamente se debe ver así. Eres un artista, ¡inténtalo!
    - Alphie: Si se despliegan rectángulos de forma aleatoria, los cuadrados más grandes van a cubrir a los más pequeños. Se deberían desplegar los rectángulos grandes primero y dejar los pequeños para el final. + Morgan: Si se despliegan rectángulos de forma aleatoria, los cuadrados más grandes van a cubrir a los más pequeños. Se deberían desplegar los rectángulos grandes primero y dejar los pequeños para el final.
    - Gamal: Sé que nuestro trabajo no se parece a la versión original, pero me gusta la forma en que aparece el rectángulo grande de color negro. Pienso que da una estructura a la pintura, con una parte superior y una parte inferior. Me gustaría incluir uno igual en mi trabajo. + Omar: Sé que nuestro trabajo no se parece a la versión original, pero me gusta la forma en que aparece el rectángulo grande de color negro. Pienso que da una estructura a la pintura, con una parte superior y una parte inferior. Me gustaría incluir uno igual en mi trabajo.
    - Betty: Me gusta la idea de dibujar líneas muy gruesas sin usar el bloque punta de lápiz plana y obtener resultados interesantes como aparecen a continuación: + Jasmine: Me gusta la idea de dibujar líneas muy gruesas sin usar el bloque punta de lápiz plana y obtener resultados interesantes como aparecen a continuación:
    forma de cuerno curvado hecha de círculos superpuestos en diferentes colores
    -
  • -
  • - pintura de van Doesburg - Hacia el lado derecho se presenta una pintura de Theo van Doesburg. Se pueden apreciar detalles en común con la pintura de Malevich, principalmente el uso de rectángulos como elementos de diseño. Sin embargo no tiene rectángulos inclinados, en su lugar se necesita que los rectángulos no estén encima unos de otros por lo que deben ser reducidos para evitar colisiones. Se puede usar el bloque ((brillo) en (mí mismo)) = 0 para identificar si el fondo detrás del elemento es negro y no el color de otro objeto. +
  • +
  • + pintura de van Doesburg + Hacia el lado derecho se presenta una pintura de Theo van Doesburg. Se pueden apreciar detalles en común con la pintura de Malevich, principalmente el uso de rectángulos como elementos de diseño. Sin embargo no tiene rectángulos inclinados, en su lugar se necesita que los rectángulos no estén encima unos de otros por lo que deben ser reducidos para evitar colisiones. Se puede usar el bloque ((brillo) en (mí mismo)) = 0 para identificar si el fondo detrás del elemento es negro y no el color de otro objeto.
  • 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 59f1e1c72d..e7555313c3 100644 --- a/cur/programming/1-introduction/3-drawing/1-exploring-motion.html +++ b/cur/programming/1-introduction/3-drawing/1-exploring-motion.html @@ -152,18 +152,18 @@

    Using Visible Stepping

    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.
    Set pen to crayon block with menu of color families, selecting "browns" and showing submenu of ten brownish named colors, highlighting "34 chestnut #954535" -
  • +
  • painting-by-Malevich At the right is a painting by Kazimir Malevich. Its elements are rectangles, either horizontal or at a 45-degree angle, plus or minus a few degrees. You can position rectangles randomly. Your picture doesn't have to look like his—you're the artist!
    - Alphie: If we just put rectangles in randomly, the tiny square dots will often be covered by larger ones. Maybe we should do big ones first and smaller ones later. + Morgan: If we just put rectangles in randomly, the tiny square dots will often be covered by larger ones. Maybe we should do big ones first and smaller ones later.
    - Gamal: I know ours don't have to look like the original, but I really like that huge black horizontal rectangle. It gives the painting a structure, with a top part and a bottom part, even though it doesn't go all the way across. I want to make sure to have one like that. + Omar: I know ours don't have to look like the original, but I really like that huge black horizontal rectangle. It gives the painting a structure, with a top part and a bottom part, even though it doesn't go all the way across. I want to make sure to have one like that.
    - Betsy: I bet we can use the idea of drawing really thick lines without using flat line ends and get interesting results: + Jasmine: I bet we can use the idea of drawing really thick lines without using flat line ends and get interesting results:
    curved horn shape made of overlapping circles in different colors
    diff --git a/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.es.html b/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.es.html index 9f93209225..49de25f80f 100644 --- a/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.es.html +++ b/cur/programming/1-introduction/3-drawing/2-exploring-snap-drawing-motion.es.html @@ -131,13 +131,13 @@

    Depurando con el bloque
    - Gamal: Me parece la figura de un mapa. Veo casas a la derecha, el centro de la ciudad a la derecha. Veo la municipalidad, el parque de bomberos y un supermercado. + Omar: Me parece la figura de un mapa. Veo casas a la derecha, el centro de la ciudad a la derecha. Veo la municipalidad, el parque de bomberos y un supermercado.
    Betty: Probablemente. A mí me parece que la izquierda representa las huellas dactilares. Por otra parte, la sección a la derecha representa claramente a una persona que mira a la derecha y tiene la nariz hacia arriba.
    - Alphie: No importa mucho a qué se parece la pintura. ¿Cómo vamos nosotros a lograr que nuestro trabajo luzca parecido? + Morgan: No importa mucho a qué se parece la pintura. ¿Cómo vamos nosotros a lograr que nuestro trabajo luzca parecido?
    Betty: Algunas partes de la pintura tienen un aspecto curvo y líneas de puntos gruesas. Podemos hacer algo como lo siguiente:
    @@ -148,7 +148,7 @@

    Depurando con el bloque línea punteada: fijar color de lápiz a
 							(cuadrado marrón); fijar tamaño de lápiz a (10); fijar el parámetro
 							(punta de lápiz plana) a (verdadero); repetir (número al azar entre (8) y (20)): {bajar lápiz; mover (número al azar entre  (10) y (20)) pasos; subir lápiz; mover (número al azar entre  (1) y (8)) pasos; girar a la derecha (número al azar entre  (-10) y (20)) grados}Depurando con el bloque Morgan: Sí, lo tengo presente, pero la frase "Tienes libertad" no significa "Quédate con el resultado que salga en el primer intento." Yo tengo otra idea. Hemos estado pensando en la pintura de "Thomas" en la forma de cuadros de color café sobre un fondo blanco, aunque es realmente más café que blanco. ¿Qué tal si empezamos con un fondo café y dibujamos líneas blancas sobre él?

    - Gamal: ¿Qué sucede con el centro de la ciudad a la derecha? + Omar: ¿Qué sucede con el centro de la ciudad a la derecha?
    Betty: Esto no es un mapa. Pero para hacerte feliz, cuando se dibujen las líneas blancas hacia la derecha, pueden ser más gruesas. De esta forma la parte derecha tendrá más espacio en blanco que la parte izquierda.
    - Alphie: Uh oh... Si ves detenidamente la pintura original, puedes notar que los elementos en color café no tienen todos la misma tonalidad. + Morgan: Uh oh... Si ves detenidamente la pintura original, puedes notar que los elementos en color café no tienen todos la misma tonalidad.
    Betty: Alphie, te preocupas demasiado. Pero para hacerte feliz de nuevo, una vez que tengamos el espacio dividido en regiones, podemos usar el bloque llenar para rellenarlas en varias tonalidades de color café.
    - Gamal: ¡Hey, amigos! ¿Recuerdan que importamos la biblioteca de crayones? ¿Adivinen qué? ¡Tenemos una biblioteca "Mapamundi", también! Esta bibloteca dibuja mapas con "acuarelas" que se ven de la siguiente forma:
    + Omar: ¡Hey, amigos! ¿Recuerdan que importamos la biblioteca de crayones? ¿Adivinen qué? ¡Tenemos una biblioteca "Mapamundi", también! Esta bibloteca dibuja mapas con "acuarelas" que se ven de la siguiente forma:
    mapa incompleto de una ciudad
    Luego recorrí cada uno de los puntos del escenario utilizando los bloques (brillo) en (mí mismo) y (tonalidad) en (mí mismo) para decidir entre hacer el punto blanco o café:
    mismo mapa incompleto de una ciudad, pero ahora en tonos marrón y blanco 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 03f6c4bb7e..bfa0383fdd 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 @@ -140,16 +140,16 @@

    Debugging with
    - Gamal: It looks like a map. Houses on the left, the town center on the right, with City Hall and the fire station and the mall. + Omar: It looks like a map. Houses on the left, the town center on the right, with City Hall and the fire station and the mall.
    - Betsy: Maybe. To me the part on the left looks a little like a fingerprint, and the part on the right is clearly a person facing right, with her nose up against the right edge, halfway down. + Jasmine: Maybe. To me the part on the left looks a little like a fingerprint, and the part on the right is clearly a person facing right, with her nose up against the right edge, halfway down.
    - Alphie: Never mind what it looks like. How are we going to make something that looks like it? + Morgan: Never mind what it looks like. How are we going to make something that looks like it?
    - Betsy: Parts of it look like curved, thick dotted lines. We could do something like this:
    + Jasmine: Parts of it look like curved, thick dotted lines. We could do something like this:
    Debugging with Debugging with
    - Betsy: Wow! That's very cool. + Jasmine: Wow! That's very cool.
    - Alphie: Nothing like what it's supposed to look like, though. + Morgan: Nothing like what it's supposed to look like, though.
    - Betsy: What do you mean, "supposed"? Go read the boldface line up above this blue box again. + Jasmine: What do you mean, "supposed"? Go read the boldface line up above this blue box again.
    - Alphie: Yeah, I know, but "take liberties" doesn't mean "take whatever happens on your first try." I have another idea. We've been thinking of Thomas's picture as brown boxes on a white background, but it's actually more brown than white. What if we start with a brown background and draw white lines on it? + Morgan: Yeah, I know, but "take liberties" doesn't mean "take whatever happens on your first try." I have another idea. We've been thinking of Thomas's picture as brown boxes on a white background, but it's actually more brown than white. What if we start with a brown background and draw white lines on it?
    - Gamal: What about that town center on the right? + Omar: What about that town center on the right?
    - Betsy: It's not a map. But to make you happy, when drawing white lines over toward the right, we can make them thicker, so the right part will have more white space than the left part. + Jasmine: It's not a map. But to make you happy, when drawing white lines over toward the right, we can make them thicker, so the right part will have more white space than the left part.
    - Alphie: Uh oh... If you look carefully at the original picture, the brown boxes aren't all the same shade of brown. + Morgan: Uh oh... If you look carefully at the original picture, the brown boxes aren't all the same shade of brown.
    - Betsy: Alphie, you worry too much. But to make you happy, once we have the space divided into brown regions, we can fill some of them in different colors. + Jasmine: Morgan, you worry too much. But to make you happy, once we have the space divided into brown regions, we can fill some of them in different colors.
    - 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:
    + Omar: Hey! Gang! Remember we imported that crayon library? Guess what! There's a "World Map" library, too! And it makes "watercolor" maps like this:
    vague map of a town
    And then I went over every dot on the stage using (brightness) at (myself) and (hue) at (myself) to decide whether to make each dot white or brown:
    same vague map of a town but now in brown and white diff --git a/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.es.html b/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.es.html index 9a1cec73eb..1194fc92f5 100644 --- a/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.es.html +++ b/cur/programming/2-complexity/2-data-structures-art/3-traversing-list.es.html @@ -22,9 +22,9 @@

    Comprobación de cada respuesta del cuestionario

    Los estudiantes están considerando cómo usar un tipo de datos abstractos mientras desarrollan el código para tu proyecto.
    -
    Alphie: Podemos usar nuestrospregunta de prueba: () y pregunta de prueba: () selectores para obtener la pregunta y la respuesta del elemento de prueba de nuestra lista. Pero, ¿cómo obtenemos el elemento de prueba fuera de la lista en primer lugar?
    +
    Morgan: Podemos usar nuestrospregunta de prueba: () y pregunta de prueba: () selectores para obtener la pregunta y la respuesta del elemento de prueba de nuestra lista. Pero, ¿cómo obtenemos el elemento de prueba fuera de la lista en primer lugar?
    - Gamal: Tal vez podamos usar artículo de dentro de un bucle para y usar el índice del bucle para como el primera entrada a elemento de, así:
    para (i) = (1) hasta (4) {
+                <span>Omar:</span> Tal vez podamos usar <code>artículo de</code> dentro de un bucle <code>para</code> y usar el índice del bucle <code>para</code> como el primera entrada a <code>elemento de</code>, así:<br />                <img class= - Betsy arrastra para cada al área de secuencias de comandos.
    + Jasmine arrastra para cada al área de secuencias de comandos.
    para cada (elemento) de 'ranura de entrada' {}
    - Gamal: Incluso podríamos renombrar elemento a algo lógico como elemento de prueba. Luego, el código interno se ejecutará una vez para cada elemento del cuestionario de nuestra lista. + Omar: Incluso podríamos renombrar elemento a algo lógico como elemento de prueba. Luego, el código interno se ejecutará una vez para cada elemento del cuestionario de nuestra lista.
    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 ba87286999..080683a615 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 @@ -23,9 +23,9 @@

    Checking Each Quiz Answer

    The students are considering how to use their abstract data type as they develop the code for their project.
    -
    Alphie: We can use our question from quiz item: () and answer from quiz item: () selectors to get the question and answer for quiz item in our list. But how do we get the quiz item out of the list in the first place?
    +
    Morgan: We can use our question from quiz item: () and answer from quiz item: () selectors to get the question and answer for quiz item in our list. But how do we get the quiz item out of the list in the first place?
    - Gamal: Maybe we can use item of inside a for loop and use the index from the for loop as the first input to item of, like this:
    + Omar: Maybe we can use item of inside a for loop and use the index from the for loop as the first input to item of, like this:
    for (i) = (1) to (4) {
     ask (question from (item (i) of (computer science quiz))) and wait
 } - Betsy drags for each into the scripting area.
    + Jasmine drags for each into the scripting area.
    for each (item) of 'list input slot' {}
    - Gamal: We could even rename item something logical like quiz item. Then the code inside will run once for each quiz item in our list. + Omar: We could even rename item something logical like quiz item. Then the code inside will run once for each quiz item in our list.
    diff --git a/cur/programming/2-complexity/old/1-getting-started-with-conditionals.html b/cur/programming/2-complexity/old/1-getting-started-with-conditionals.html index a0b430dc41..d470d4a09c 100644 --- a/cur/programming/2-complexity/old/1-getting-started-with-conditionals.html +++ b/cur/programming/2-complexity/old/1-getting-started-with-conditionals.html @@ -74,7 +74,7 @@

    Working with If Else

    - Gamal: Hey, Betsy! Alphie! Delia and I did the puzzles in problem 2 using if else the way I think we were supposed to, but we also found a way to do them with repeat until and even a way without using any conditionals at all. + Omar: Hey, Jasmine! Morgan! Delia and I did the puzzles in problem 2 using if else the way I think we were supposed to, but we also found a way to do them with repeat until and even a way without using any conditionals at all.
    Betty: How did you do it without conditionals? @@ -83,27 +83,27 @@

    Working with If Else

    Delia: Like this.
    - Gamal begins to rebuild a script for the first puzzle: + Omar begins to rebuild a script for the first puzzle: partial solution using only repeat 90
    Delia: This makes the red part. You do pretty much the same thing for the green part.
    - Alphie and Betty: Cool! + Morgan and Betty: Cool!
    - Gamal: But we couldn't find any way to do problem 3 without if else. Do you think there is a way? + Omar: But we couldn't find any way to do problem 3 without if else. Do you think there is a way?
      -
    1. Finish Gamal and Delia's script so that it draws the correct picture and keeps the sprite moving forever around that circle redrawing the picture.
    2. +
    3. Finish Omar and Delia's script so that it draws the correct picture and keeps the sprite moving forever around that circle redrawing the picture.
    4. Compare a method using if else with your method that uses no conditionals. What are the advantages/disadvantages of each method?
    5. Solve at least one of the puzzles from problem 2 using repeat until.
    6. - Answer Gamal's last question. Do you think there is a way to do problem 3 without if else? + Answer Omar's last question. Do you think there is a way to do problem 3 without if else? Share Your Work
      Explain how or why not.
    7. diff --git a/cur/programming/2-complexity/old/3-click-points-new-old.html b/cur/programming/2-complexity/old/3-click-points-new-old.html index 3f0ea4f7a8..0f21563199 100644 --- a/cur/programming/2-complexity/old/3-click-points-new-old.html +++ b/cur/programming/2-complexity/old/3-click-points-new-old.html @@ -25,14 +25,14 @@

      Capturing Clicks to Draw

      ST-Suggested replacement:".....Why can't we just draw a letter on the screen by clicking on the corner points that define the letter?"

      Again, I don't think it's realistic to click on the screen freehand. On the previous page they drew their A on graph paper first. --bh

    --> -
    Betsy and Alphie are still using coordinate lists to draw letters.
    +
    Jasmine and Morgan are still using coordinate lists to draw letters.
    Take turns speaking -
    Alphie: Typing in all these coordinates is a pain. Let's write a program so that if we have a picture, we can click on the corners and let the program collect the coordinates?
    +
    Morgan: Typing in all these coordinates is a pain. Let's write a program so that if we have a picture, we can click on the corners and let the program collect the coordinates?
    -
    Betsy: Great idea. And I know that we can import images as a stage background, so all we have to do is....
    +
    Jasmine: Great idea. And I know that we can import images as a stage background, so all we have to do is....
    @@ -67,20 +67,20 @@

    Capturing Clicks to Draw

    -
    Betsy: I can think of a way to collect clicks.
    +
    Jasmine: I can think of a way to collect clicks.
    1. Initialize the point list variable to an empty list.
    2. Make the sprite follow the mouse.
    3. Every time we click on that sprite, we add its position to the point list.
    -
    Alphie: We did the mouse-following thing in Unit 1.
    -
    Betsy: Yes, and we added new items to a list in that "greet player" project, also in Unit 1.
    -
    Gamal: When we click, we should probably also give the user some visible feedback that the click has been processed.
    -
    Alphie: What do you mean?
    -
    Gamal: Well, the user is going to be following the outline of a shape, and clicking at turning points. That may take a while, and users get nervous if the computer doesn't seem to be paying attention. So I thought we should mark each point the user clicks, a little circle or something.
    -
    Alphie: I have an idea! There's a stamp block (in Pen) block that paints a picture of the sprite itself on the stage. That arrowhead thingy will point right at the point where the user clicked.
    +
    Morgan: We did the mouse-following thing in Unit 1.
    +
    Jasmine: Yes, and we added new items to a list in that "greet player" project, also in Unit 1.
    +
    Omar: When we click, we should probably also give the user some visible feedback that the click has been processed.
    +
    Morgan: What do you mean?
    +
    Omar: Well, the user is going to be following the outline of a shape, and clicking at turning points. That may take a while, and users get nervous if the computer doesn't seem to be paying attention. So I thought we should mark each point the user clicks, a little circle or something.
    +
    Morgan: I have an idea! There's a stamp block (in Pen) block that paints a picture of the sprite itself on the stage. That arrowhead thingy will point right at the point where the user clicked.
    - Alphie and Betsy develop code to implement their ideas.
    + Morgan and Jasmine develop code to implement their ideas.
    Entering points for E
    @@ -88,7 +88,7 @@

    Capturing Clicks to Draw

    1. - The project file you loaded contains three unfinished scripts, one for each of Betsy's steps. + The project file you loaded contains three unfinished scripts, one for each of Jasmine's steps.
      • In the first script, variable point list should be given an appropriate initial value.
      • In the second script, you need a way to tell the sprite to stop following the mouse. Replace the forever block with one that will loop only until the user presses the space key.
      • diff --git a/cur/programming/2-complexity/old/5-click-points.html b/cur/programming/2-complexity/old/5-click-points.html index 8a66ff0d32..efe9989033 100644 --- a/cur/programming/2-complexity/old/5-click-points.html +++ b/cur/programming/2-complexity/old/5-click-points.html @@ -22,18 +22,18 @@

        Clicking Points to Capture Coordinates

        ST-Suggested replacement:".....Why can't we just draw a letter on the screen by clicking on the corner points that define the letter?"

        Again, I don't think it's realistic to click on the screen freehand. On the previous page they drew their A on graph paper first. --bh

    --> -
    Betsy and Alphie start the same conversation as in the main lab, but it goes in a slightly different direction:
    +
    Jasmine and Morgan start the same conversation as in the main lab, but it goes in a slightly different direction:
    Take turns speaking -
    Alphie: Typing all these coordinates is a pain. Why can't we just sketch the letters on the screen, and then click on the corners?
    +
    Morgan: Typing all these coordinates is a pain. Why can't we just sketch the letters on the screen, and then click on the corners?
    -
    Betsy: Umm, I think they won't like us drawing on the screen. But we could find a picture of what we want to trace and import it as a stage background. We'll have to write a block that keeps waiting for a mouse click, and then adds those mouse coordinates to a list. When all the points have been entered, the block should report the list of points.
    +
    Jasmine: Umm, I think they won't like us drawing on the screen. But we could find a picture of what we want to trace and import it as a stage background. We'll have to write a block that keeps waiting for a mouse click, and then adds those mouse coordinates to a list. When all the points have been entered, the block should report the list of points.
    set (E) to (list of points)
    - Alphie and Betsy develop code to implement their idea.
    + Morgan and Jasmine develop code to implement their idea.
    Entering points for E
    (At the end of the movie, you can see that they used a click outside the stage to indicate the end of the shape.)
    diff --git a/cur/programming/2-complexity/old/bh-test.html b/cur/programming/2-complexity/old/bh-test.html index f62790e092..b9a6b67273 100644 --- a/cur/programming/2-complexity/old/bh-test.html +++ b/cur/programming/2-complexity/old/bh-test.html @@ -75,7 +75,7 @@

    Working with If Else

    - Gamal: Hey, Betsy! Alphie! Delia and I did the puzzles in problem 2 using if else the way I think we were supposed to, but we also found a way to do them with repeat until and even a way without using any conditionals at all. + Omar: Hey, Jasmine! Morgan! Delia and I did the puzzles in problem 2 using if else the way I think we were supposed to, but we also found a way to do them with repeat until and even a way without using any conditionals at all.
    Betty: How did you do it without conditionals? @@ -84,27 +84,27 @@

    Working with If Else

    Delia: Like this.
    - Gamal begins to rebuild a script for the first puzzle: + Omar begins to rebuild a script for the first puzzle: partial solution using only repeat 90
    Delia: This makes the red part. You do pretty much the same thing for the green part.
    - Alphie and Betty: Cool! + Morgan and Betty: Cool!
    - Gamal: But we couldn't find any way to do problem 3 without if else. Do you think there is a way? + Omar: But we couldn't find any way to do problem 3 without if else. Do you think there is a way?
      -
    1. Finish Gamal and Delia's script so that it draws the correct picture and keeps the sprite moving forever around that circle redrawing the picture.
    2. +
    3. Finish Omar and Delia's script so that it draws the correct picture and keeps the sprite moving forever around that circle redrawing the picture.
    4. Compare a method using if else with your method that uses no conditionals. What are the advantages/disadvantages of each method?
    5. Solve at least one of the puzzles from problem 2 using repeat until.
    6. - Answer Gamal's last question. Do you think there is a way to do problem 3 without if else? + Answer Omar's last question. Do you think there is a way to do problem 3 without if else? Share Your Work
      Explain how or why not.
    7. diff --git a/cur/programming/2-complexity/old/x-conditionals-predicates.html b/cur/programming/2-complexity/old/x-conditionals-predicates.html index 52f9e5ad15..35422bcd2f 100644 --- a/cur/programming/2-complexity/old/x-conditionals-predicates.html +++ b/cur/programming/2-complexity/old/x-conditionals-predicates.html @@ -79,7 +79,7 @@

      Working with If Else

      - Gamal: Hey, Betsy! Alphie! Delia and I did the puzzles in problem 2 using if else the way I think we were supposed to, but we also found a way to do them with repeat until and even a way without using any conditionals at all. + Omar: Hey, Jasmine! Morgan! Delia and I did the puzzles in problem 2 using if else the way I think we were supposed to, but we also found a way to do them with repeat until and even a way without using any conditionals at all.
      Betty: How did you do it without conditionals? @@ -88,27 +88,27 @@

      Working with If Else

      Delia: Like this.
      - Gamal begins to rebuild a script for the first puzzle: + Omar begins to rebuild a script for the first puzzle: partial solution using only repeat 90
      Delia: This makes the red part. You do pretty much the same thing for the green part.
      - Alphie and Betty: Cool! + Morgan and Betty: Cool!
      - Gamal: But we couldn't find any way to do problem 3 without if else. Do you think there is a way? + Omar: But we couldn't find any way to do problem 3 without if else. Do you think there is a way?
        -
      1. Finish Gamal and Delia's script so that it draws the correct picture and keeps the sprite moving forever around that circle redrawing the picture.
      2. +
      3. Finish Omar and Delia's script so that it draws the correct picture and keeps the sprite moving forever around that circle redrawing the picture.
      4. Compare a method using if else with your method that uses no conditionals. What are the advantages/disadvantages of each method?
      5. Solve at least one of the puzzles from problem 2 using repeat until.
      6. - Answer Gamal's last question. Do you think there is a way to do problem 3 without if else? + Answer Omar's last question. Do you think there is a way to do problem 3 without if else? Share Your Work
        Explain how or why not.
      7. diff --git a/cur/programming/2-complexity/optional-projects/future/2-data-types.es.html b/cur/programming/2-complexity/optional-projects/future/2-data-types.es.html index b87731b0d4..879e5b0857 100644 --- a/cur/programming/2-complexity/optional-projects/future/2-data-types.es.html +++ b/cur/programming/2-complexity/optional-projects/future/2-data-types.es.html @@ -57,20 +57,20 @@

        moved to new first page

        -
      Gamal joins Betsy and Alphie's ongoing discussion from previous page about using a list of coordinates to draw a letter.
      -
      Gamal: I was looking at our go-to-point() block and thought of a way to make it much easier to read.
      -
      Betsy: Yeah, expressions like item(2)of-point are hard to read. Even after I wrote it to find the y coordinate, I had to think twice to understand it.
      -
      Gamal is suggesting data abstraction: creating a new ADT to hide the details. When using the point ADT, you won't have to think about how points are represented as lists.
      -
      Gamal: That's what I mean. Let's make it clearer. We can define a y coordinate of (point) block to use instead of item 2 of .
      -
      Betsy: But that block would do just the same thing as item 2 of, so what's the use? It won't make the program shorter.
      -
      Gamal: Yes, but it'll make the program easier to read and easier to think about. We can use x coordinate and y coordinate instead of item of as inputs to the go to block.
      +
      Omar joins Jasmine and Morgan's ongoing discussion from previous page about using a list of coordinates to draw a letter.
      +
      Omar: I was looking at our go-to-point() block and thought of a way to make it much easier to read.
      +
      Jasmine: Yeah, expressions like item(2)of-point are hard to read. Even after I wrote it to find the y coordinate, I had to think twice to understand it.
      +
      Omar is suggesting data abstraction: creating a new ADT to hide the details. When using the point ADT, you won't have to think about how points are represented as lists.
      +
      Omar: That's what I mean. Let's make it clearer. We can define a y coordinate of (point) block to use instead of item 2 of .
      +
      Jasmine: But that block would do just the same thing as item 2 of, so what's the use? It won't make the program shorter.
      +
      Omar: Yes, but it'll make the program easier to read and easier to think about. We can use x coordinate and y coordinate instead of item of as inputs to the go to block.
      They build two blocks: x coordinate of (point){report item 1 of (point)} and y coordinate of (point){report item 2 of (point)}
      -
      Betsy: Hmmm... And if we make a point () () block, then we can write list{point(-50)(20), point(-10)(120),...point(-30)(20)} instead of list{list(-50)(20), list(-10)(120),...list(-30)(20)}. That would make it clearer what this list really is.
      +
      Jasmine: Hmmm... And if we make a point () () block, then we can write list{point(-50)(20), point(-10)(120),...point(-30)(20)} instead of list{list(-50)(20), list(-10)(120),...list(-30)(20)}. That would make it clearer what this list really is.
      - Betsy builds this block. She marks the x and y input variables as numbers.
      + Jasmine builds this block. She marks the x and y input variables as numbers.
      point(X#)(Y#){report(list(X)(Y)}
      @@ -88,7 +88,7 @@

      moved to new first page

      1. If your U2L2-DrawShape project is not already open, open it now.
      2. -
      3. Improve your go to point block (from "U2L2-DrawShape") by using selectors inside the go to point block as Betsy and Gamal described.
      4. +
      5. Improve your go to point block (from "U2L2-DrawShape") by using selectors inside the go to point block as Jasmine and Omar described.
      6. Save Your Work diff --git a/cur/programming/2-complexity/optional-projects/future/2-data-types.html b/cur/programming/2-complexity/optional-projects/future/2-data-types.html index 70ddd6d998..f8c33e95b1 100644 --- a/cur/programming/2-complexity/optional-projects/future/2-data-types.html +++ b/cur/programming/2-complexity/optional-projects/future/2-data-types.html @@ -57,20 +57,20 @@

        moved to new first page

        -
      Gamal joins Betsy and Alphie's ongoing discussion from previous page about using a list of coordinates to draw a letter.
      -
      Gamal: I was looking at our go-to-point() block and thought of a way to make it much easier to read.
      -
      Betsy: Yeah, expressions like item(2)of-point are hard to read. Even after I wrote it to find the y coordinate, I had to think twice to understand it.
      -
      Gamal is suggesting data abstraction: creating a new ADT to hide the details. When using the point ADT, you won't have to think about how points are represented as lists.
      -
      Gamal: That's what I mean. Let's make it clearer. We can define a y coordinate of (point) block to use instead of item 2 of .
      -
      Betsy: But that block would do just the same thing as item 2 of, so what's the use? It won't make the program shorter.
      -
      Gamal: Yes, but it'll make the program easier to read and easier to think about. We can use x coordinate and y coordinate instead of item of as inputs to the go to block.
      +
      Omar joins Jasmine and Morgan's ongoing discussion from previous page about using a list of coordinates to draw a letter.
      +
      Omar: I was looking at our go-to-point() block and thought of a way to make it much easier to read.
      +
      Jasmine: Yeah, expressions like item(2)of-point are hard to read. Even after I wrote it to find the y coordinate, I had to think twice to understand it.
      +
      Omar is suggesting data abstraction: creating a new ADT to hide the details. When using the point ADT, you won't have to think about how points are represented as lists.
      +
      Omar: That's what I mean. Let's make it clearer. We can define a y coordinate of (point) block to use instead of item 2 of .
      +
      Jasmine: But that block would do just the same thing as item 2 of, so what's the use? It won't make the program shorter.
      +
      Omar: Yes, but it'll make the program easier to read and easier to think about. We can use x coordinate and y coordinate instead of item of as inputs to the go to block.
      They build two blocks: x coordinate of (point){report item 1 of (point)} and y coordinate of (point){report item 2 of (point)}
      -
      Betsy: Hmmm... And if we make a point () () block, then we can write list{point(-50)(20), point(-10)(120),...point(-30)(20)} instead of list{list(-50)(20), list(-10)(120),...list(-30)(20)}. That would make it clearer what this list really is.
      +
      Jasmine: Hmmm... And if we make a point () () block, then we can write list{point(-50)(20), point(-10)(120),...point(-30)(20)} instead of list{list(-50)(20), list(-10)(120),...list(-30)(20)}. That would make it clearer what this list really is.
      - Betsy builds this block. She marks the x and y input variables as numbers.
      + Jasmine builds this block. She marks the x and y input variables as numbers.
      point(X#)(Y#){report(list(X)(Y)}
      @@ -88,7 +88,7 @@

      moved to new first page

      1. If your U2L2-DrawShape project is not already open, open it now.
      2. -
      3. Improve your go to point block (from "U2L2-DrawShape") by using selectors inside the go to point block as Betsy and Gamal described.
      4. +
      5. Improve your go to point block (from "U2L2-DrawShape") by using selectors inside the go to point block as Jasmine and Omar described.
      6. Save Your Work diff --git a/cur/programming/2-complexity/optional-projects/future/3-click-points.es.html b/cur/programming/2-complexity/optional-projects/future/3-click-points.es.html index 8c276384a8..c7aa3a7f7a 100644 --- a/cur/programming/2-complexity/optional-projects/future/3-click-points.es.html +++ b/cur/programming/2-complexity/optional-projects/future/3-click-points.es.html @@ -36,15 +36,15 @@

        Capturing Clicks as Points

        ST-Suggested replacement:".....Why can't we just draw a letter on the screen by clicking on the corner points that define the letter?"

        Again, I don't think it's realistic to click on the screen freehand. On the previous page they drew their A on graph paper first. --bh

      --> -
      Betsy and Alphie are still using coordinate lists to draw letters.
      +
      Jasmine and Morgan are still using coordinate lists to draw letters.
      Take turns speaking -
      Alphie: Typing in all these coordinates is a pain. Let's write a program so that if we have a picture, we can click on the corners and let the program collect the coordinates?
      +
      Morgan: Typing in all these coordinates is a pain. Let's write a program so that if we have a picture, we can click on the corners and let the program collect the coordinates?
      -
      Alphie: I have an idea, we can staple a picture to the screen.
      -
      Betsy: Great idea. And I know that we can import images as a stage background, so all we have to do is....
      +
      Morgan: I have an idea, we can staple a picture to the screen.
      +
      Jasmine: Great idea. And I know that we can import images as a stage background, so all we have to do is....
      @@ -96,17 +96,17 @@

      Setting the Stage Background

      -
      Alphie: We'll have to initialize the point list variable to an empty list first.
      -
      Betsy: And we know how to make the sprite follow the mouse; we did it in Unit 1.
      -
      Gamal: Yes, and every time we click, we want to add the position to a list as we did in the Unit 1 "Greet Player" project.
      +
      Morgan: We'll have to initialize the point list variable to an empty list first.
      +
      Jasmine: And we know how to make the sprite follow the mouse; we did it in Unit 1.
      +
      Omar: Yes, and every time we click, we want to add the position to a list as we did in the Unit 1 "Greet Player" project.
      We cut the Unit 1 "Greet Player" project. --MF, 12/16/18
      -
      Gamal: When we click, we should give the user some feedback that the click has been processed.
      -
      Alphie: What do you mean? Like a sound?
      -
      Gamal: Maybe, but I was thinking we should mark each point somehow so we feel confident the computer is recording our clicks.
      -
      Alphie: I have an idea! There's a stamp block (in Pen) block that stamps a picture of the sprite right where it is on the stage.
      -
      Gamal: Great. And the Turtle sprite will leave stamps pointing right where the user clicks.
      +
      Omar: When we click, we should give the user some feedback that the click has been processed.
      +
      Morgan: What do you mean? Like a sound?
      +
      Omar: Maybe, but I was thinking we should mark each point somehow so we feel confident the computer is recording our clicks.
      +
      Morgan: I have an idea! There's a stamp block (in Pen) block that stamps a picture of the sprite right where it is on the stage.
      +
      Omar: Great. And the Turtle sprite will leave stamps pointing right where the user clicks.
      - Alphie, Betsy, and Gamal develop code to implement their ideas.
      + Morgan, Jasmine, and Omar develop code to implement their ideas.
      Entering points for E
      diff --git a/cur/programming/2-complexity/optional-projects/future/3-click-points.html b/cur/programming/2-complexity/optional-projects/future/3-click-points.html index 2fb89f482b..02119718ef 100644 --- a/cur/programming/2-complexity/optional-projects/future/3-click-points.html +++ b/cur/programming/2-complexity/optional-projects/future/3-click-points.html @@ -33,15 +33,15 @@

      Capturing Clicks as Points

      ST-Suggested replacement:".....Why can't we just draw a letter on the screen by clicking on the corner points that define the letter?"

      Again, I don't think it's realistic to click on the screen freehand. On the previous page they drew their A on graph paper first. --bh

      --> -
      Betsy and Alphie are still using coordinate lists to draw letters.
      +
      Jasmine and Morgan are still using coordinate lists to draw letters.
      Take turns speaking -
      Alphie: Typing in all these coordinates is a pain. Let's write a program so that if we have a picture, we can click on the corners and let the program collect the coordinates?
      +
      Morgan: Typing in all these coordinates is a pain. Let's write a program so that if we have a picture, we can click on the corners and let the program collect the coordinates?
      -
      Alphie: I have an idea, we can staple a picture to the screen.
      -
      Betsy: Great idea. And I know that we can import images as a stage background, so all we have to do is....
      +
      Morgan: I have an idea, we can staple a picture to the screen.
      +
      Jasmine: Great idea. And I know that we can import images as a stage background, so all we have to do is....
      @@ -93,17 +93,17 @@

      Setting the Stage Background

      -
      Alphie: We'll have to initialize the point list variable to an empty list first.
      -
      Betsy: And we know how to make the sprite follow the mouse; we did it in Unit 1.
      -
      Gamal: Yes, and every time we click, we want to add the position to a list as we did in the Unit 1 "Greet Player" project.
      +
      Morgan: We'll have to initialize the point list variable to an empty list first.
      +
      Jasmine: And we know how to make the sprite follow the mouse; we did it in Unit 1.
      +
      Omar: Yes, and every time we click, we want to add the position to a list as we did in the Unit 1 "Greet Player" project.
      We cut the Unit 1 "Greet Player" project. --MF, 12/16/18
      -
      Gamal: When we click, we should give the user some feedback that the click has been processed.
      -
      Alphie: What do you mean? Like a sound?
      -
      Gamal: Maybe, but I was thinking we should mark each point somehow so we feel confident the computer is recording our clicks.
      -
      Alphie: I have an idea! There's a stamp block (in Pen) block that stamps a picture of the sprite right where it is on the stage.
      -
      Gamal: Great. And the Turtle sprite will leave stamps pointing right where the user clicks.
      +
      Omar: When we click, we should give the user some feedback that the click has been processed.
      +
      Morgan: What do you mean? Like a sound?
      +
      Omar: Maybe, but I was thinking we should mark each point somehow so we feel confident the computer is recording our clicks.
      +
      Morgan: I have an idea! There's a stamp block (in Pen) block that stamps a picture of the sprite right where it is on the stage.
      +
      Omar: Great. And the Turtle sprite will leave stamps pointing right where the user clicks.
      - Alphie, Betsy, and Gamal develop code to implement their ideas.
      + Morgan, Jasmine, and Omar develop code to implement their ideas.
      Entering points for E
      diff --git a/cur/programming/2-complexity/optional-projects/future/4-mandala.es.html b/cur/programming/2-complexity/optional-projects/future/4-mandala.es.html index 77378bd6c8..8269261723 100644 --- a/cur/programming/2-complexity/optional-projects/future/4-mandala.es.html +++ b/cur/programming/2-complexity/optional-projects/future/4-mandala.es.html @@ -41,27 +41,27 @@

      Diagonal Design

       
      - Alphie: The outside of the design is a 10-sided polygon. We already created a block to draw a polygon, but connecting the vertices will be a pain.
      + Morgan: The outside of the design is a 10-sided polygon. We already created a block to draw a polygon, but connecting the vertices will be a pain.
      - Alphie opens their polygon project.
      + Morgan opens their polygon project.
      I'm not confident that this is what their polygon code will look like. Maybe that's ok... ? --MF, 3/25/19
      polygon, sides:(number of sides#) side length:(length#){repeat(number of sides){move(length) steps; turn clockwise(360/number of sides) degrees}}
      These italics are confusing in terms of intent and not helping with the reading. --MF, 3/25/19
      -
      Betsy: So let's make our polygon block store each vertex as a point while it draws the polygon. We listed points as we clicked on them. This is the same, but with the program generating the points.
      +
      Jasmine: So let's make our polygon block store each vertex as a point while it draws the polygon. We listed points as we clicked on them. This is the same, but with the program generating the points.
      I wonder if it would help to use the term ADT in the previous sentence somewhere. --MF, 3/25/19
      -
      Gamal: Right! Set up a empty list variable first, and then use add() to () inside the polygon block.
      +
      Omar: Right! Set up a empty list variable first, and then use add() to () inside the polygon block.
      No reason to use an image rather than just add here. --MF, 3/25/19 Maybe it's a reminder that they're using lists? -bh
      -
      Alphie: Global variable or a script variable?
      -
      Gamal: Well, we need to use it inside polygon and in the script that draws the design, so I'd make it global so multiple scripts can access it.
      -
      Betsy: I have an idea for the part of the program that actually draws the diagonals.
      +
      Morgan: Global variable or a script variable?
      +
      Omar: Well, we need to use it inside polygon and in the script that draws the design, so I'd make it global so multiple scripts can access it.
      +
      Jasmine: I have an idea for the part of the program that actually draws the diagonals.
      Technically, a side of a polygon isn't a diagonal. -bh

      Yes, but isn't this referring to the line segments inside, which are diagonals? --MF, 5/31/19

      - Betsy sketches this: Stage 2 of Mandala + Jasmine sketches this: Stage 2 of Mandala
      -
      Gamal: Smart! We'll draw all the diagonals from one vertex as a subproblem.
      -
      Alphie: Perfect! Pick one vertex and use for each to connect just that one to each other vertex. After that, it's easy! We can use that block on each vertex.
      +
      Omar: Smart! We'll draw all the diagonals from one vertex as a subproblem.
      +
      Morgan: Perfect! Pick one vertex and use for each to connect just that one to each other vertex. After that, it's easy! We can use that block on each vertex.
      diff --git a/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.es.html b/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.es.html index a79e254365..fd27fceea1 100644 --- a/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.es.html +++ b/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.es.html @@ -43,7 +43,7 @@

      VAGUE OUTLINE FOR NEW VERSION

       

      - Alphie and Betsy are building a program that will take a list of points as input and connect the dots. They sketched the letter A on graph paper and listed the vertices.
      + Morgan and Jasmine are building a program that will take a list of points as input and connect the dots. They sketched the letter A on graph paper and listed the vertices.
      Letter A drawn of graph paper with corner coordinatesCorner coordinates (-50, 20) (-10,120), ... (-30,20)

      @@ -68,7 +68,7 @@

      VAGUE OUTLINE FOR NEW VERSION

    8. Build a point constructor to use in the go to 'dropdown input slot'
    9. Build a draw shape() block that takes a list of points as input. (show images of it taking a list and also taking a variable and of that variable being set as a list--perhaps all behind a click.)
    10. - Some incarnation of Alphie's bug in #4 below. + Some incarnation of Morgan's bug in #4 below.

      pen down;for each(item) of (A){go to point(item)}

    11. @@ -129,7 +129,7 @@

      OLD VERSION FOLLOWS

       
      -

      Alphie and Betsy are building a program that will take a list of points (each of which is a list of x and y coordinates) as input and connect the dots. They figure they can use it to draw pictures or graphs of data:

      +

      Morgan and Jasmine are building a program that will take a list of points (each of which is a list of x and y coordinates) as input and connect the dots. They figure they can use it to draw pictures or graphs of data:

      To make a set of starting data, they sketched the letter A on graph paper. They chose a scale that they figured would make their picture a good size on the stage.

      @@ -144,19 +144,19 @@

      OLD VERSION FOLLOWS

      sprite drawing letter A by going to each set of coordinates

      -
      Betsy: This list of coordinates outlines an A, so let's name it A.
      +
      Jasmine: This list of coordinates outlines an A, so let's name it A.
      I don't think we should use code tags for Make a variable. Should we? --MF, 12/19/18
      -

      Betsy clicks Make a variable, names it A, and builds set A to {{-50,20}, {-10,120}, {10,120}, {50,20}, {30,20}, {20,50}, {-20,50}, {-30,20}}.

      +

      Jasmine clicks Make a variable, names it A, and builds set A to {{-50,20}, {-10,120}, {10,120}, {50,20}, {30,20}, {20,50}, {-20,50}, {-30,20}}.

      Then she clicks that set block to run it.

      - Alphie: So, for each of those eight points, we want the sprite to move to it. HM... go to x:() y:() won't work, because it needs two separate inputs. We need a block that takes one input, a point like list(-50)(20). + Morgan: So, for each of those eight points, we want the sprite to move to it. HM... go to x:() y:() won't work, because it needs two separate inputs. We need a block that takes one input, a point like list(-50)(20).
      -
      Betsy: So we'll make a new block. Let's call it go to point. It'll work like this go to point (list (-50) (20)). We'll use go to x:() y:() or glide (.5) secs to x:() y:() inside it, but we'll have to process the input, list(-50)(20), to supply x: and y: separately. Hmmm...
      -
      Gamal: Oh! I know how! I bet we can use item()of(list). Give it a number as its first input. I bet that the rectangle with two smaller orange rectangles inside just says that it expects a list as its second input.
      -
      Alphie: I wonder if we can make our go to point block show that it expects a list as input....
      +
      Jasmine: So we'll make a new block. Let's call it go to point. It'll work like this go to point (list (-50) (20)). We'll use go to x:() y:() or glide (.5) secs to x:() y:() inside it, but we'll have to process the input, list(-50)(20), to supply x: and y: separately. Hmmm...
      +
      Omar: Oh! I know how! I bet we can use item()of(list). Give it a number as its first input. I bet that the rectangle with two smaller orange rectangles inside just says that it expects a list as its second input.
      +
      Morgan: I wonder if we can make our go to point block show that it expects a list as input....
      @@ -208,20 +208,20 @@

      Specifying an Input Type

      Suggest page break.

      Brian now agrees with having a page break here. --MF, 12/19/18 OTOH we should decide if we want to take advantage of Snap!'s ability to take lists in GO TO.

        -
      Alphie: Great! Now we can use our go to point block for each of the points in our list.
      -
      Betsy: I bet we can use for-each-(item)-of(){}.
      +
      Morgan: Great! Now we can use our go to point block for each of the points in our list.
      +
      Jasmine: I bet we can use for-each-(item)-of(){}.
      -

      Alphie and Betsy design this new script to automate the process of going to each point.

      +

      Morgan and Jasmine design this new script to automate the process of going to each point.

      pen down;for each(item) of (A){go to point(item)}

      Then they test it out.

      -
      Alphie: Yup! for each does exactly what we want. But we have a couple of bugs to fix.
      +
      Morgan: Yup! for each does exactly what we want. But we have a couple of bugs to fix.
      1. Build and test the script they used.
      2. -
      3. Fix the two bugs Alphie noticed.
      4. +
      5. Fix the two bugs Morgan noticed.
      6. "U2L2-DrawShape"Save your work as U2L2-DrawShape
      7. Think and write: diff --git a/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.html b/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.html index 31dec1fb9d..81b00e73ac 100644 --- a/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.html +++ b/cur/programming/2-complexity/optional-projects/future/4-the-for-each-block.html @@ -43,7 +43,7 @@

        VAGUE OUTLINE FOR NEW VERSION

         

        - Alphie and Betsy are building a program that will take a list of points as input and connect the dots. They sketched the letter A on graph paper and listed the vertices.
        + Morgan and Jasmine are building a program that will take a list of points as input and connect the dots. They sketched the letter A on graph paper and listed the vertices.
        Letter A drawn of graph paper with corner coordinatesCorner coordinates (-50, 20) (-10,120), ... (-30,20)

        @@ -68,7 +68,7 @@

        VAGUE OUTLINE FOR NEW VERSION

      8. Build a point constructor to use in the go to 'dropdown input slot'
      9. Build a draw shape() block that takes a list of points as input. (show images of it taking a list and also taking a variable and of that variable being set as a list--perhaps all behind a click.)
      10. - Some incarnation of Alphie's bug in #4 below. + Some incarnation of Morgan's bug in #4 below.

        pen down;for each(item) of (A){go to point(item)}

      11. @@ -129,7 +129,7 @@

        OLD VERSION FOLLOWS

         
        -

        Alphie and Betsy are building a program that will take a list of points (each of which is a list of x and y coordinates) as input and connect the dots. They figure they can use it to draw pictures or graphs of data:

        +

        Morgan and Jasmine are building a program that will take a list of points (each of which is a list of x and y coordinates) as input and connect the dots. They figure they can use it to draw pictures or graphs of data:

        To make a set of starting data, they sketched the letter A on graph paper. They chose a scale that they figured would make their picture a good size on the stage.

        @@ -144,19 +144,19 @@

        OLD VERSION FOLLOWS

        sprite drawing letter A by going to each set of coordinates

        -
        Betsy: This list of coordinates outlines an A, so let's name it A.
        +
        Jasmine: This list of coordinates outlines an A, so let's name it A.
        I don't think we should use code tags for Make a variable. Should we? --MF, 12/19/18
        -

        Betsy clicks Make a variable, names it A, and builds set A to {{-50,20}, {-10,120}, {10,120}, {50,20}, {30,20}, {20,50}, {-20,50}, {-30,20}}.

        +

        Jasmine clicks Make a variable, names it A, and builds set A to {{-50,20}, {-10,120}, {10,120}, {50,20}, {30,20}, {20,50}, {-20,50}, {-30,20}}.

        Then she clicks that set block to run it.

        - Alphie: So, for each of those eight points, we want the sprite to move to it. HM... go to x:() y:() won't work, because it needs two separate inputs. We need a block that takes one input, a point like list(-50)(20). + Morgan: So, for each of those eight points, we want the sprite to move to it. HM... go to x:() y:() won't work, because it needs two separate inputs. We need a block that takes one input, a point like list(-50)(20).
        -
        Betsy: So we'll make a new block. Let's call it go to point. It'll work like this go to point (list (-50) (20)). We'll use go to x:() y:() or glide (.5) secs to x:() y:() inside it, but we'll have to process the input, list(-50)(20), to supply x: and y: separately. Hmmm...
        -
        Gamal: Oh! I know how! I bet we can use item()of(list). Give it a number as its first input. I bet that the rectangle with two smaller orange rectangles inside just says that it expects a list as its second input.
        -
        Alphie: I wonder if we can make our go to point block show that it expects a list as input....
        +
        Jasmine: So we'll make a new block. Let's call it go to point. It'll work like this go to point (list (-50) (20)). We'll use go to x:() y:() or glide (.5) secs to x:() y:() inside it, but we'll have to process the input, list(-50)(20), to supply x: and y: separately. Hmmm...
        +
        Omar: Oh! I know how! I bet we can use item()of(list). Give it a number as its first input. I bet that the rectangle with two smaller orange rectangles inside just says that it expects a list as its second input.
        +
        Morgan: I wonder if we can make our go to point block show that it expects a list as input....
        @@ -208,20 +208,20 @@

        Specifying an Input Type

        Suggest page break.

        Brian now agrees with having a page break here. --MF, 12/19/18 OTOH we should decide if we want to take advantage of Snap!'s ability to take lists in GO TO.

          -
        Alphie: Great! Now we can use our go to point block for each of the points in our list.
        -
        Betsy: I bet we can use for-each-(item)-of(){}.
        +
        Morgan: Great! Now we can use our go to point block for each of the points in our list.
        +
        Jasmine: I bet we can use for-each-(item)-of(){}.
        -

        Alphie and Betsy design this new script to automate the process of going to each point.

        +

        Morgan and Jasmine design this new script to automate the process of going to each point.

        pen down;for each(item) of (A){go to point(item)}

        Then they test it out.

        -
        Alphie: Yup! for each does exactly what we want. But we have a couple of bugs to fix.
        +
        Morgan: Yup! for each does exactly what we want. But we have a couple of bugs to fix.
        1. Build and test the script they used.
        2. -
        3. Fix the two bugs Alphie noticed.
        4. +
        5. Fix the two bugs Morgan noticed.
        6. "U2L2-DrawShape"Save your work as U2L2-DrawShape
        7. Think and write: diff --git a/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.es.html b/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.es.html index cd0a7533e7..dfa12940a1 100644 --- a/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.es.html +++ b/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.es.html @@ -41,27 +41,27 @@

          Diagonal Design

           
          - Alphie: The outside of the design is a 10-sided polygon. We already created a block to draw a polygon, but connecting the vertices will be a pain.
          + Morgan: The outside of the design is a 10-sided polygon. We already created a block to draw a polygon, but connecting the vertices will be a pain.
          - Alphie opens their polygon project.
          + Morgan opens their polygon project.
          I'm not confident that this is what their polygon code will look like. Maybe that's ok... ? --MF, 3/25/19
          polygon, sides:(number of sides#) side length:(length#){repeat(number of sides){move(length) steps; turn clockwise(360/number of sides) degrees}}
          These italics are confusing in terms of intent and not helping with the reading. --MF, 3/25/19
          -
          Betsy: So let's make our polygon block store each vertex as a point while it draws the polygon. We listed points as we clicked on them. This is the same, but with the program generating the points.
          +
          Jasmine: So let's make our polygon block store each vertex as a point while it draws the polygon. We listed points as we clicked on them. This is the same, but with the program generating the points.
          I wonder if it would help to use the term ADT in the previous sentence somewhere. --MF, 3/25/19
          -
          Gamal: Right! Set up a empty list variable first, and then use add() to () inside the polygon block.
          +
          Omar: Right! Set up a empty list variable first, and then use add() to () inside the polygon block.
          No reason to use an image rather than just add here. --MF, 3/25/19 Maybe it's a reminder that they're using lists? -bh
          -
          Alphie: Global variable or a script variable?
          -
          Gamal: Well, we need to use it inside polygon and in the script that draws the design, so I'd make it global so multiple scripts can access it.
          -
          Betsy: I have an idea for the part of the program that actually draws the diagonals.
          +
          Morgan: Global variable or a script variable?
          +
          Omar: Well, we need to use it inside polygon and in the script that draws the design, so I'd make it global so multiple scripts can access it.
          +
          Jasmine: I have an idea for the part of the program that actually draws the diagonals.
          Technically, a side of a polygon isn't a diagonal. -bh

          Yes, but isn't this referring to the line segments inside, which are diagonals? --MF, 5/31/19

          - Betsy sketches this: Stage 2 of Mandala + Jasmine sketches this: Stage 2 of Mandala
          -
          Gamal: Smart! We'll draw all the diagonals from one vertex as a subproblem.
          -
          Alphie: Perfect! Pick one vertex and use for each to connect just that one to each other vertex. After that, it's easy! We can use that block on each vertex.
          +
          Omar: Smart! We'll draw all the diagonals from one vertex as a subproblem.
          +
          Morgan: Perfect! Pick one vertex and use for each to connect just that one to each other vertex. After that, it's easy! We can use that block on each vertex.
          diff --git a/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.html b/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.html index 9c0af2e895..c2ea0200fb 100644 --- a/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.html +++ b/cur/programming/2-complexity/optional-projects/future/7-diagonal-design.html @@ -41,27 +41,27 @@

          Diagonal Design

           
          - Alphie: The outside of the design is a 10-sided polygon. We already created a block to draw a polygon, but connecting the vertices will be a pain.
          + Morgan: The outside of the design is a 10-sided polygon. We already created a block to draw a polygon, but connecting the vertices will be a pain.
          - Alphie opens their polygon project.
          + Morgan opens their polygon project.
          I'm not confident that this is what their polygon code will look like. Maybe that's ok... ? --MF, 3/25/19
          polygon, sides:(number of sides#) side length:(length#){repeat(number of sides){move(length) steps; turn clockwise(360/number of sides) degrees}}
          These italics are confusing in terms of intent and not helping with the reading. --MF, 3/25/19
          -
          Betsy: So let's make our polygon block store each vertex as a point while it draws the polygon. We listed points as we clicked on them. This is the same, but with the program generating the points.
          +
          Jasmine: So let's make our polygon block store each vertex as a point while it draws the polygon. We listed points as we clicked on them. This is the same, but with the program generating the points.
          I wonder if it would help to use the term ADT in the previous sentence somewhere. --MF, 3/25/19
          -
          Gamal: Right! Set up a empty list variable first, and then use add() to () inside the polygon block.
          +
          Omar: Right! Set up a empty list variable first, and then use add() to () inside the polygon block.
          No reason to use an image rather than just add here. --MF, 3/25/19 Maybe it's a reminder that they're using lists? -bh
          -
          Alphie: Global variable or a script variable?
          -
          Gamal: Well, we need to use it inside polygon and in the script that draws the design, so I'd make it global so multiple scripts can access it.
          -
          Betsy: I have an idea for the part of the program that actually draws the diagonals.
          +
          Morgan: Global variable or a script variable?
          +
          Omar: Well, we need to use it inside polygon and in the script that draws the design, so I'd make it global so multiple scripts can access it.
          +
          Jasmine: I have an idea for the part of the program that actually draws the diagonals.
          Technically, a side of a polygon isn't a diagonal. -bh

          Yes, but isn't this referring to the line segments inside, which are diagonals? --MF, 5/31/19

          - Betsy sketches this: Stage 2 of Mandala + Jasmine sketches this: Stage 2 of Mandala
          -
          Gamal: Smart! We'll draw all the diagonals from one vertex as a subproblem.
          -
          Alphie: Perfect! Pick one vertex and use for each to connect just that one to each other vertex. After that, it's easy! We can use that block on each vertex.
          +
          Omar: Smart! We'll draw all the diagonals from one vertex as a subproblem.
          +
          Morgan: Perfect! Pick one vertex and use for each to connect just that one to each other vertex. After that, it's easy! We can use that block on each vertex.
          diff --git a/cur/programming/3-lists/2-contact-list/1-build-the-list.es.html b/cur/programming/3-lists/2-contact-list/1-build-the-list.es.html index 0a3946bd62..1b367fc23e 100644 --- a/cur/programming/3-lists/2-contact-list/1-build-the-list.es.html +++ b/cur/programming/3-lists/2-contact-list/1-build-the-list.es.html @@ -34,11 +34,11 @@

          ¿Por qué mundial?

          Crear el tipo de dato abstracto (ADT)

          -
          Betsy y Gamal planean crear una lista de contactos en Snap!.
          -
          Betsy: Necesitamos una forma de agregar un contacto a nuestra lista de contactos.
          -
          Gamal: Cada contacto será una lista que con el nombre de una persona, número de teléfono, dirección, correo electrónico, o lo que sea que escribamos.
          -
          Betsy: En la Unidad 2, creamos un elemento de prueba tipo de dato abstracto para almacenar las preguntas y respuestas en una lista de elementos de prueba. Aquí, podemos crear un tipo de dato abstracto contacto para almacenar los datos de cada contacto en nuestra lista de contactos.
          -
          Gamal: Sí. En este proyecto, necesitaremos un constructor contacto y luego selectores para acceder al nombre, dirección y número de teléfono para cualquier contacto dado.
          +
          Jasmine y Omar planean crear una lista de contactos en Snap!.
          +
          Jasmine: Necesitamos una forma de agregar un contacto a nuestra lista de contactos.
          +
          Omar: Cada contacto será una lista que con el nombre de una persona, número de teléfono, dirección, correo electrónico, o lo que sea que escribamos.
          +
          Jasmine: En la Unidad 2, creamos un elemento de prueba tipo de dato abstracto para almacenar las preguntas y respuestas en una lista de elementos de prueba. Aquí, podemos crear un tipo de dato abstracto contacto para almacenar los datos de cada contacto en nuestra lista de contactos.
          +
          Omar: Sí. En este proyecto, necesitaremos un constructor contacto y luego selectores para acceder al nombre, dirección y número de teléfono para cualquier contacto dado.

          Preservar la privacidad

          @@ -55,7 +55,7 @@

          Preservar la privacidad

          Crea un contacto constructor que acepte tres datos como entrada: el nombre del contacto, el número de teléfono y la dirección.
          contacto con nombre: () dirección: () teléfono: ()
          Debe reportar un contacto completo (una lista de los tres elementos):
          - contacto con nombre: (Betsy) dirección: (123 Main St. #4, Nueva York, NY 10001) teléfono: (212-555-1234) reporta {Betsy Anderson; 123 Main St. #4, Nueva York, NY 10001; 212-555-1234}
          + contacto con nombre: (Jasmine) dirección: (123 Main St. #4, Nueva York, NY 10001) teléfono: (212-555-1234) reporta {Betsy Anderson; 123 Main St. #4, Nueva York, NY 10001; 212-555-1234}
        8. Escribe los bloques selector para recuperar el nombre del contacto, dirección del contacto o teléfono del contacto. reporta nombre de contacto (bloque de contacto con entradas)
          @@ -94,17 +94,17 @@

          Preservar la privacidad

          teléfono - Betsy Anderson + Jasmine Anderson 123 Main St. #4, Nueva York, NY 10001 212-555-1234 - Alphie Preston + Morgan Preston 149 E. 16th Ave., Sunnyvale, CA 94089 408-555-6789 - Gamal Abdel + Omar Hernandez 369 Center St., Boston, MA 02130 617-555-1098 @@ -117,7 +117,7 @@

          Preservar la privacidad

      12. Prueba a seleccionar el nombre, dirección o teléfono de un contacto de tu lista.
        - nombre del contacto: (elemento (aleatorio) de (lista de contactos)) reporta Alphie Preston + nombre del contacto: (elemento (aleatorio) de (lista de contactos)) reporta Morgan Preston
      13. Guarda tu trabajo
      14. Depura cualquier problema.
      15. diff --git a/cur/programming/3-lists/2-contact-list/1-build-the-list.html b/cur/programming/3-lists/2-contact-list/1-build-the-list.html index 6bcc3af3b5..2429443f64 100644 --- a/cur/programming/3-lists/2-contact-list/1-build-the-list.html +++ b/cur/programming/3-lists/2-contact-list/1-build-the-list.html @@ -34,11 +34,11 @@

        Why a global variable?

        Creating the ADT

        -
        Betsy and Gamal are planning to build a Contact List in Snap!.
        -
        Betsy: We need a way to add a contact to our contact list.
        -
        Gamal: Each contact will be a list that with the a person's name, phone number, address, email, or whatever we write.
        -
        Betsy: In Unit 2, we created a quiz item abstract data type to store the questions and answers in a list of quiz items. Here, we can make a contact abstract data type to store the data for each contact in our list of contacts.
        -
        Gamal: Yeah. In this project, we'll need a contact constructor and then selectors to access the name, address, and phone number for any given contact.
        +
        Jasmine and Omar are planning to build a Contact List in Snap!.
        +
        Jasmine: We need a way to add a contact to our contact list.
        +
        Omar: Each contact will be a list that with the a person's name, phone number, address, email, or whatever we write.
        +
        Jasmine: In Unit 2, we created a quiz item abstract data type to store the questions and answers in a list of quiz items. Here, we can make a contact abstract data type to store the data for each contact in our list of contacts.
        +
        Omar: Yeah. In this project, we'll need a contact constructor and then selectors to access the name, address, and phone number for any given contact.

        Preserve Privacy

        @@ -97,17 +97,17 @@

        Preserve Privacy

        phone - Betsy Anderson + Jasmine Anderson 123 Main St. #4, New York, NY 10001 212-555-1234 - Alphie Preston + Morgan Preston 149 E. 16th Ave., Sunnyvale, CA 94089 408-555-6789 - Gamal Abdel + Omar Hernandez 369 Center St., Boston, MA 02130 617-555-1098 @@ -121,7 +121,7 @@

        Preserve Privacy

      16. Try selecting the name, address, or phone from a contact in your list
        - name from contact: (item (random) of (contact list)) reporting Alphie Preston + name from contact: (item (random) of (contact list)) reporting Morgan Preston
      17. Save Your Work
      18. Debug any problems.
      19. diff --git a/cur/programming/3-lists/2-contact-list/2-adding-contact.es.html b/cur/programming/3-lists/2-contact-list/2-adding-contact.es.html index 33d4b685d6..f6dfcf56a3 100644 --- a/cur/programming/3-lists/2-contact-list/2-adding-contact.es.html +++ b/cur/programming/3-lists/2-contact-list/2-adding-contact.es.html @@ -75,17 +75,17 @@

        Recopilación de los datos del usuario

        teléfono - Betsy Anderson + Jasmine Anderson 123 Main St. #4, Nueva York, NY 10001 212-555-1234 - Alphie Preston + Morgan Preston 149 E. 16th Ave., Sunnyvale, CA 94089 408-555-6789 - Gamal Abdel + Omar Hernandez 369 Center St., Boston, MA 02130 617-555-1098 @@ -115,11 +115,11 @@

        Recopilación de los datos del usuario

        - En esta actividad, refinarás el manejo de nombres de personas. Cuando buscas a una persona en particular, necesitar ver su nombre igual que lo has hecho en esta página, primero el nombre: "Alphie Preston". Pero supongamos que quieres ordenar tus contactos. Por lo general, eso lo hace el apellido, por lo que la lista sería algo así como + En esta actividad, refinarás el manejo de nombres de personas. Cuando buscas a una persona en particular, necesitar ver su nombre igual que lo has hecho en esta página, primero el nombre: "Morgan Preston". Pero supongamos que quieres ordenar tus contactos. Por lo general, eso lo hace el apellido, por lo que la lista sería algo así como

          -
        • Abdel, Gamal
        • -
        • Anderson, Betsy
        • -
        • Preston, Alphie
        • +
        • Hernandez, Omar
        • +
        • Anderson, Jasmine
        • +
        • Preston, Morgan
        Por lo tanto, debe poder mostrar un nombre primero para la visualización normal, pero primero el apellido para la clasificación.

        @@ -130,7 +130,7 @@

        Recopilación de los datos del usuario

        1. El primer paso es crear un tipo de dato abstracto para los nombres. Necesitarás un constructor que tome el nombre y el apellido como entradas y reporte una lista de ellos para representar la parte del nombre de un contacto..
        2. Leer un nombre: El siguiente paso es modificar el programa que escribiste arriba para que pida por separado el nombre y el apellido, construya un nombre (es decir, una lista) usando el constructor que acabas de escribir, y use esa lista como entrada de nombre para el bloque contacto con nombre. Este es un tipo de dato abstracto (nombre) dentro de otro tipo de dato abstracto (contacto).
        3. -
        4. Escribir un nombre: Tu bloque nombre de contacto ahora reportará una lista, tal y como debería. Pero algunas otras partes del programa, como la parte que muestra un contacto al usuario, necesitan mostrar el nombre como una cadena de texto: "Betsy Anderson". La parte que ordena la lista de contactos también quiere una cadena: "Anderson, Betsy". Escribe dos bloquesnombre, formulario de visualización, desde la ranura de entrada de la lista de contactos y nombre, formulario de clasificación, desde el contacto 'ranura de entrada de lista que unan las dos partes del nombre con un espacio y/o una coma según sea necesario.
        5. +
        6. Escribir un nombre: Tu bloque nombre de contacto ahora reportará una lista, tal y como debería. Pero algunas otras partes del programa, como la parte que muestra un contacto al usuario, necesitan mostrar el nombre como una cadena de texto: "Jasmine Anderson". La parte que ordena la lista de contactos también quiere una cadena: "Anderson, Jasmine". Escribe dos bloquesnombre, formulario de visualización, desde la ranura de entrada de la lista de contactos y nombre, formulario de clasificación, desde el contacto 'ranura de entrada de lista que unan las dos partes del nombre con un espacio y/o una coma según sea necesario.
        Este proceso de tres pasos (crear un tipo de dato abstracto, usarlo para leer valores de ese tipo, usarlo para escribir valores de ese tipo) es muy común en la programación. Volverás a seguir los mismos tres pasos en la sección Llevándolo más allá de la página 4.

        Guarda tu trabajo. En la página 4, encontrarás un contacto al permitir que el usuario ingrese cualquier parte del nombre y muestre el contacto completo. Usa la abstracción de nombre que acabas de crear cuando hagas eso.

        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 a191a5840b..af49e544d2 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 @@ -75,17 +75,17 @@

        Collecting Data from the User

        phone - Betsy Anderson + Jasmine Anderson 123 Main St. #4, New York, NY 10001 212-555-1234 - Alphie Preston + Morgan Preston 149 E. 16th Ave., Sunnyvale, CA 94089 408-555-6789 - Gamal Abdel + Omar Hernandez 369 Center St., Boston, MA 02130 617-555-1098 @@ -115,11 +115,11 @@

        Collecting Data from the User

        - In this activity, you're going to refine the handling of people's names. When you look up a particular person, you want to see their name as you've been seeing it on this page, first name first: "Alphie Preston." But suppose you want to sort your contacts. Typically that's done by last name, so the list would look something like + In this activity, you're going to refine the handling of people's names. When you look up a particular person, you want to see their name as you've been seeing it on this page, first name first: "Morgan Preston." But suppose you want to sort your contacts. Typically that's done by last name, so the list would look something like

          -
        • Abdel, Gamal
        • -
        • Anderson, Betsy
        • -
        • Preston, Alphie
        • +
        • Hernandez, Omar
        • +
        • Anderson, Jasmine
        • +
        • Preston, Morgan
        So you need to be able to show a name first name first for ordinary display, but last name first for sorting.

        @@ -131,7 +131,7 @@

        Collecting Data from the User

      20. 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.
      21. Reading a name: The next step is to modify the program you wrote above so that it asks separately for the first name and the last name, constructs a name (that is, a list) using the constructor you just wrote, and uses that list as the name input to the contact with name block. This is an abstract data type (name) inside another abstract data type (contact).
      22. -
      23. 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.
      24. +
      25. 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: "Jasmine Anderson." The part that sorts the contact list also wants a string: "Anderson, Jasmine." 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.

      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.es.html b/cur/programming/3-lists/2-contact-list/4-looking-up-data.es.html index afb965e8dc..2dbedaacdf 100644 --- a/cur/programming/3-lists/2-contact-list/4-looking-up-data.es.html +++ b/cur/programming/3-lists/2-contact-list/4-looking-up-data.es.html @@ -96,7 +96,7 @@

      Selección de datos específicos

    12. - Actividades desafiantes Esta es la parte complicada: para que todo funcione correctamente, un nombre (según lo define el tipo de dato abstracto de nombre) debe saber si es un nombre de pila, como Betsy Anderson, o un apellido, como como Sun Yat-Sen. Redefine tu tipo de dato abstracto de nombre para convertirlo en una lista de tres elementos. El primero será el texto 'nombre de pila primero' o 'apellido primero'. Este primer elemento se denomina etiqueta de tipo . El segundo elemento será el nombre (o nombres) de pila y el tercero será el apellido (o apellidos). + Actividades desafiantes Esta es la parte complicada: para que todo funcione correctamente, un nombre (según lo define el tipo de dato abstracto de nombre) debe saber si es un nombre de pila, como Jasmine Anderson, o un apellido, como como Sun Yat-Sen. Redefine tu tipo de dato abstracto de nombre para convertirlo en una lista de tres elementos. El primero será el texto 'nombre de pila primero' o 'apellido primero'. Este primer elemento se denomina etiqueta de tipo . El segundo elemento será el nombre (o nombres) de pila y el tercero será el apellido (o apellidos).
      Has estado usando etiquetas de tipo todo el tiempo sin saberlo. Muchos lenguajes de programación, incluido Snap!, adjuntan etiquetas de tipo a cada valor, diciendo "Soy una lista" o "Soy un número", etc. El usuario (es decir, tú) no ve las etiquetas de tipo, a menos que proporciones una entrada incorrecta a un bloque primitivo y veas un mensaje como "Esperando lista pero recibiendo texto".
      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 650ad400c2..f2945c5ad4 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 @@ -119,7 +119,7 @@

      Selecting Specific Data

    13. Tough Stuff - Here's the tricky part: To make this all work correctly, a name (as defined by the name ADT) has to know whether it's a given-first name such as Betsy Anderson or a family-first name such as Sun Yat-Sen. Redefine your Name ADT to make it a list of three items. The first will be either the text 'given-first' or 'family-first'. This first item is called a type tag. The second item will be the given name (or names), and the third will be the family name (or names). + Here's the tricky part: To make this all work correctly, a name (as defined by the name ADT) has to know whether it's a given-first name such as Jasmine Anderson or a family-first name such as Sun Yat-Sen. Redefine your Name ADT to make it a list of three items. The first will be either the text 'given-first' or 'family-first'. This first item is called a type tag. The second item will be the given name (or names), and the third will be the family name (or names).
      You've been using type tags all along without knowing it. Many programming languages, including Snap!, attach type tags to every value, saying "I am a list" or "I am a number" and so on. The user (i.e., you) doesn't see the type tags, unless you provide a bad input to a primitive block, and you see a message like "Expecting list but getting text."
      diff --git a/cur/programming/3-lists/2-contact-list/5-mapping-over-list.es.html b/cur/programming/3-lists/2-contact-list/5-mapping-over-list.es.html index 5dddb809bf..a60054c642 100644 --- a/cur/programming/3-lists/2-contact-list/5-mapping-over-list.es.html +++ b/cur/programming/3-lists/2-contact-list/5-mapping-over-list.es.html @@ -16,11 +16,11 @@

      Transformar cada elemento de la lista

      - Alphie, Betsy y Gamal están creando un bloque iniciales del nombre que acepta un contacto como entrada y reporta las iniciales de esa persona.
      + Morgan, Jasmine y Omar están creando un bloque iniciales del nombre que acepta un contacto como entrada y reporta las iniciales de esa persona.
      iniciales del nombre (nombre del contacto ((elemento (1) de (lista de contactos)) reporta 'BA'
      - Betsy: usé el bloque dividir () por ('punto rosa que indica un carácter de espacio') para dividir el nombre completo del contacto en una lista de sus nombres, y luego uní la primera letra de cada nombre:
      + Jasmine: usé el bloque dividir () por ('punto rosa que indica un carácter de espacio') para dividir el nombre completo del contacto en una lista de sus nombres, y luego uní la primera letra de cada nombre:
      iniciales del contacto: (contacto) {
     variables de programa (lista de nombres)
     establecer (lista de nombres) en (dividir (nombre de contacto (contacto)) por (palabra))
@@ -43,10 +43,10 @@ <h2>Transformar cada elemento de la lista</h2>
                     </p>
                 </div>
             </div>
-            <div><span>Alphie:</span> Pero, ¿qué pasa con alguien que tiene tres nombres como Martin Luther King? Solo reportaría -
      Gamal: Ah, eso es porque el bloque solo toma la primera letra de los elementos 1 y 2. Tenemos que agregar letra (1) de (elemento (3) de (lista de nombres)).
      -
      Betsy: Pero, ¿y si alguien tiene aún más nombres? En la familia de mi tía cada uno tiene cinco o seis nombres...
      -
      Gamal: Bueno, entonces necesitamos tomar letra (1) de cada elemento en la lista de nombres. Eso suena como si lo que necesitáramos fuera una función de orden superior. Las funciones de orden superior son buenas para hacer cosas con elementos individuales de una lista.
      +
      Morgan: Pero, ¿qué pasa con alguien que tiene tres nombres como Martin Luther King? Solo reportaría "ML" para él.
      +
      Omar: Ah, eso es porque el bloque solo toma la primera letra de los elementos 1 y 2. Tenemos que agregar letra (1) de (elemento (3) de (lista de nombres)).
      +
      Jasmine: Pero, ¿y si alguien tiene aún más nombres? En la familia de mi tía cada uno tiene cinco o seis nombres...
      +
      Omar: Bueno, entonces necesitamos tomar letra (1) de cada elemento en la lista de nombres. Eso suena como si lo que necesitáramos fuera una función de orden superior. Las funciones de orden superior son buenas para hacer cosas con elementos individuales de una lista.

      Una función de orden superior (higher-order function) es una función que toma una función como entrada (o reporta una función como salida).

      @@ -119,7 +119,7 @@

      Transformar cada elemento de la lista

      Primero, crea una expresión para reportar una lista de los nombres de todos tus contactos.
      - observador de la lista de contactos en la vista de lista lista en vista de lista que contiene tres elementos: Betsy Anderson, Alphie Preston, Gamal Abdel + observador de la lista de contactos en la vista de lista lista en vista de lista que contiene tres elementos: Betsy Anderson, Morgan Preston, Omar Hernandez

      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 1710c57cd7..334ccb4dac 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 @@ -16,11 +16,11 @@

      Transforming Every List Item

      - Alphie, Betsy, and Gamal are building an initials from name block that accepts one contact as input and reports that person's initials.
      + Morgan, Jasmine, and Omar are building an initials from name block that accepts one contact as input and reports that person's initials.
      initials from name (name from contact( (item (1) of (contact list)) reporting 'BA'
      - Betsy: I used the split () by ('pink dot indicating a space character') block to break up the contact's full name into a list of their names, and then I joined the first letter of each name:
      + Jasmine: I used the split () by ('pink dot indicating a space character') block to break up the contact's full name into a list of their names, and then I joined the first letter of each name:
      initials from contact: (contact) {
     script variables (list of names)
     set (list of names) to (split (name from contact (contact)) by (word))
@@ -44,10 +44,10 @@ <h2>Transforming Every List Item</h2>
                     </p>
                 </div>
             </div>
-            <div><span>Alphie:</span> But what about someone who goes by three names like Martin Luther King? It would just report -
      Gamal: Oh, that's because the block only takes the first letter of items 1 and 2. We have to add in letter (1) of (item (3) of (list of names)).
      -
      Betsy: But what if someone has more names than that? In my aunt's family they each have five or six names...
      -
      Gamal: Well, then we need to take letter (1) of each item in the list of names. That sounds as if what we need is a higher-order function. Higher-order functions are good at doing things with individual items in a list.
      +
      Morgan: But what about someone who goes by three names like Martin Luther King? It would just report "ML" for him.
      +
      Omar: Oh, that's because the block only takes the first letter of items 1 and 2. We have to add in letter (1) of (item (3) of (list of names)).
      +
      Jasmine: But what if someone has more names than that? In my aunt's family they each have five or six names...
      +
      Omar: Well, then we need to take letter (1) of each item in the list of names. That sounds as if what we need is a higher-order function. Higher-order functions are good at doing things with individual items in a list.

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

      @@ -125,7 +125,7 @@

      Transforming Every List Item

      First, create an expression to report a list of the names of all your contacts.
      contact list watcher in list view - list in list view containing three items: Betsy Anderson, Alphie Preston, Gamal Abdel + list in list view containing three items: Jasmine Anderson, Morgan Preston, Gamal Abdel

      diff --git a/cur/programming/3-lists/2-contact-list/old/1.5-countdown.html b/cur/programming/3-lists/2-contact-list/old/1.5-countdown.html index 9edc93724b..1360178747 100644 --- a/cur/programming/3-lists/2-contact-list/old/1.5-countdown.html +++ b/cur/programming/3-lists/2-contact-list/old/1.5-countdown.html @@ -10,20 +10,20 @@

      Countdown

      -
      Alphie and Betsy are trying to build a block to generate a list of whole numbers from n down to 1.
      +
      Morgan and Jasmine are trying to build a block to generate a list of whole numbers from n down to 1.
      - Alphie: I used a script variable and kept shoving a new number at the beginning of the list using for.
      + Morgan: I used a script variable and kept shoving a new number at the beginning of the list using for.
      countdown using a for-loop
      -
      Betsy: Let's try it!
      +
      Jasmine: Let's try it!
      They take it out for a spin.
      -
      Alphie: Oh. Not what I expected...
      +
      Morgan: Oh. Not what I expected...
        -
      1. Fix Alphie and Betsy's countdown script so that it does what it's supposed to do.
      2. +
      3. Fix Morgan and Jasmine's countdown script so that it does what it's supposed to do.
      @@ -32,9 +32,9 @@

      Countdown

      -
      Gamal joins the group and looks over Alphie's shoulder.
      +
      Omar joins the group and looks over Morgan's shoulder.
      - Gamal: Wow, it would never have occurred to me to write it that way! You want countdown (5) to report the list {5, 4, 3, 2, 1}. But countdown (4) is {4, 3, 2, 1}, so all you have to do is stick a 5 in front:
      + Omar: Wow, it would never have occurred to me to write it that way! You want countdown (5) to report the list {5, 4, 3, 2, 1}. But countdown (4) is {4, 3, 2, 1}, so all you have to do is stick a 5 in front:
      define countdown (n): if n=0 report empty list, otherwise report (n) in front of (countdown (n-1))
      @@ -44,7 +44,7 @@

      Countdown

      Talk with Your Partner
        -
      1. Gamal's description of his algorithm didn't mention the if in his code. What would happen if he left that part out? Why?
      2. +
      3. Omar's description of his algorithm didn't mention the if in his code. What would happen if he left that part out? Why?
      diff --git a/cur/programming/3-lists/2-contact-list/old/2-modifying-adt.html b/cur/programming/3-lists/2-contact-list/old/2-modifying-adt.html index c8582fa603..5567596231 100644 --- a/cur/programming/3-lists/2-contact-list/old/2-modifying-adt.html +++ b/cur/programming/3-lists/2-contact-list/old/2-modifying-adt.html @@ -13,14 +13,14 @@

      Creating the Name ADT

      -
      Betsy: Right now, our program uses one text string to hold each contact's name, but people have multiple names.
      -
      Gamal: We can just put both names in together.
      -
      Betsy: Let's look at the list on your phone.
      +
      Jasmine: Right now, our program uses one text string to hold each contact's name, but people have multiple names.
      +
      Omar: We can just put both names in together.
      +
      Jasmine: Let's look at the list on your phone.
      list of names
      Ah, they're sorted by last name, even though it's not the beginning of the name text.
      -
      Gamal: Hmmm... What if we used another list to separate the last name from the first name?
      -
      Betsy: OK. So, we could make a name ADT and two new selectors: one to report the name they way it appears for the user: first-name last-name; and one to report the name so we can sort it: last-name comma first-name.
      +
      Omar: Hmmm... What if we used another list to separate the last name from the first name?
      +
      Jasmine: OK. So, we could make a name ADT and two new selectors: one to report the name they way it appears for the user: first-name last-name; and one to report the name so we can sort it: last-name comma first-name.
      @@ -50,7 +50,7 @@

      Creating the Name ADT

    14. Give the selectors expected input types to make it obvious that they each expect a list (one whole name) as input.
    15. - Analyze and Debug. Betsy and Gamal tried to use their sorting form of name block together with their contact constructor. They were expecting their code to report "Anderson, Betsy", but it didn't work.
      + Analyze and Debug. Jasmine and Omar tried to use their sorting form of name block together with their contact constructor. They were expecting their code to report "Anderson, Jasmine", but it didn't work.
      sorting-form from name: (contact name: (Betsy) address: (123 Main St. #4, New York, NY 10001) phone: (212-555-1234)) reporting 123 Main St. #4, New York, NY 10001 Betsy Anderson
      Talk with Your Partner What's going wrong? What could they do instead?
    16. @@ -96,13 +96,13 @@

      Creating the Name ADT

      Tough Stuff but worth it!
      -
      Mei and Alphie join the conversation about Contact List
      +
      Mei and Morgan join the conversation about Contact List
      Mei: Do you want your app to work in China? People there put their family name first, so Sun Yìxiān is in the Sun family, and would be in the S part of your name list, not the Y part.
      -
      Alphie: So, you're saying we need two different name types, with different constructors and selectors?
      -
      Gamal: At least two. After you finish your program, I'll tell you about names in Iceland (given name first, but sorted on given name, not family name) and Myanmar (no family name at all)!
      -
      Alphie puts his head in his hands and groans.
      -
      Betsy: Nah, it doesn't have to be that bad. We'll just have one name type, but it'll have variants, and we'll include a type tag along with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Gamal can add more variants later if he wants.
      +
      Morgan: So, you're saying we need two different name types, with different constructors and selectors?
      +
      Omar: At least two. After you finish your program, I'll tell you about names in Iceland (given name first, but sorted on given name, not family name) and Myanmar (no family name at all)!
      +
      Morgan puts his head in his hands and groans.
      +
      Jasmine: Nah, it doesn't have to be that bad. We'll just have one name type, but it'll have variants, and we'll include a type tag along with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Omar can add more variants later if he wants.
        @@ -155,27 +155,27 @@

        Adding Menu Inputs

        -->
        -
        Alphie: Okay, now I guess we have to make selectors, right?
        +
        Morgan: Okay, now I guess we have to make selectors, right?
        name type (name): report item 1 of (name) given name (name): report item 2 of (name) family name (name):  report item 3 (name) -
        Gamal: Don't call the first one type from name. We're going to need the same type selector for other ADTs also, so call it type tag.
        -
        Alphie: How do you know?
        -
        Gamal: I read ahead in the curriculum!
        -
        Alphie and Betsy groan.
        +
        Omar: Don't call the first one type from name. We're going to need the same type selector for other ADTs also, so call it type tag.
        +
        Morgan: How do you know?
        +
        Omar: I read ahead in the curriculum!
        +
        Morgan and Jasmine groan.
          -
        1. Make the three selectors, using Gamal's suggested name for the first one.
        2. +
        3. Make the three selectors, using Omar's suggested name for the first one.
        4. family from name: (name, type: given-first given: Abraham family: Lincoln)  -->  Lincoln
        -
        Alphie: But I'm not sure how this variant idea is going to help. Mostly, the rest of the program isn't going to want the family name alone. It's going to want the entire name, either in display order or in sorting order, so aren't we going to need blocks like given first name in sorted form (name) and so on?
        -
        Betsy: Oh, hang on, you're thinking of it as a selector just for one variant (given-first names), but we can simplify a bit by thinking of it as a selector for all names, name (sorted form) ( ). The definition is a little more complicated, but the rest of the program will be able to use it without caring what kind of variant it has.
        +
        Morgan: But I'm not sure how this variant idea is going to help. Mostly, the rest of the program isn't going to want the family name alone. It's going to want the entire name, either in display order or in sorting order, so aren't we going to need blocks like given first name in sorted form (name) and so on?
        +
        Jasmine: Oh, hang on, you're thinking of it as a selector just for one variant (given-first names), but we can simplify a bit by thinking of it as a selector for all names, name (sorted form) ( ). The definition is a little more complicated, but the rest of the program will be able to use it without caring what kind of variant it has.
        1. -
          For a given-first name we put a comma and space between the names, "Anderson, Betsy"; there won't be a comma for family-first names ("Sun Yìxiān").
          +
          For a given-first name we put a comma and space between the names, "Anderson, Jasmine"; there won't be a comma for family-first names ("Sun Yìxiān").
          This is confusing because they already have a block with this name. Are they supposed to rebuild it here? We should be clearer. Also, I just don't understand this. I'm sorry. I tried to build solutions for this project, but I'm stuck here. I don't understand what goes next in this block, and I don't think we should keep something in the curriculum that I can't even understand what we are trying to build, but you know that and you want it anyway... --MF, 7/13/17
          Finish this definition:
          name (sorted form) (name):  if ((type tag (name)) = [given-first]) report (join (family name (name)) [, ] (given name (name)))
          @@ -185,11 +185,11 @@

          Adding Menu Inputs

          - Alphie: Oh, I see! Now in the rest of the program we can just say things like
          + Morgan: Oh, I see! Now in the rest of the program we can just say things like
          for each (contact) of (contact list)  say (name (display form) (contact name (contact))) for 2 secs
          - Betsy: It's even better than that! This is where the magic comes in. When we make the Contact ADT, we give it a type tag too:
          + Jasmine: It's even better than that! This is where the magic comes in. When we make the Contact ADT, we give it a type tag too:
          contact, name: (name) address: (address) phone: (phone): report (list [contact] (name) (address) (phone))
          (We'll have to change the selectors, too, and recreate the contact list.)


          @@ -201,8 +201,8 @@

          Adding Menu Inputs

            -
          1. Create all that, and make sure Betsy's "magic" works.
          2. -
          3. Then add Gamal's variants for names in Iceland and Myanmar.
          4. +
          5. Create all that, and make sure Jasmine's "magic" works.
          6. +
          7. Then add Omar's variants for names in Iceland and Myanmar.
      diff --git a/cur/programming/3-lists/2-contact-list/old/4-lists-of-lists.html b/cur/programming/3-lists/2-contact-list/old/4-lists-of-lists.html index cd7341db1c..d3fd8f9586 100644 --- a/cur/programming/3-lists/2-contact-list/old/4-lists-of-lists.html +++ b/cur/programming/3-lists/2-contact-list/old/4-lists-of-lists.html @@ -62,23 +62,23 @@

      Lists of Lists

      - Alphie and Betty are making a list of coordinates for a sprite to make this drawing:
      sprite drawing by going to each set of coordinates + Morgan and Betty are making a list of coordinates for a sprite to make this drawing:
      sprite drawing by going to each set of coordinates
      Betty: We could use a list of lists with x- and y-coordinates for each the position of the sprite like this:
      Betty makes: coordinates list ((50,120), (-20,40), etc)
      -
      Alphie: So then, we want to make the sprite go to (item 1, item 2) for each of the lists in the list. Let me try to build a script to do that.
      +
      Morgan: So then, we want to make the sprite go to (item 1, item 2) for each of the lists in the list. Let me try to build a script to do that.
      Get rid of FOR loop and index variable. Use FOR EACH right away.
      -
      Alphie makes script with for loop
      +
      Morgan makes script with for loop
      Why does the sprite go to (200,-20)?
      Betty: First, the sprite goes to (200,-20). So when i is 1, the sprite glides to (item 1 of item 1, item 2 of item 1). Then when i is 2, the sprite glides to (item 1 of item 2, item 2 of item 2. And then it goes to the third and fouth points too.
      -
      Alphie: Since these are lists, I wonder if there's a way to use for each instead of for...
      +
      Morgan: Since these are lists, I wonder if there's a way to use for each instead of for...
      Import Tools
        -
      1. Modify Alphie's script to use for each.
      2. +
      3. Modify Morgan's script to use for each.
      --> diff --git a/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.es.html b/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.es.html index 66accf7fd9..a23677a59d 100644 --- a/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.es.html +++ b/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.es.html @@ -18,12 +18,12 @@

      Preparing to Sort

      -
      Gamal: Right now, our program uses one text string to hold each contact's name, but people have multiple names.
      -
      Betsy: That's ok; we can still search them.
      -
      Gamal: It's fine for displaying names on the screen, but it would make it hard to sort the contacts by last name.
      -
      Betsy: We could use another list to separate the last name from the first name.
      -
      Gamal: If we change the ADT though, we'll have have to adapt all the blocks that use it...
      -
      Betsy:That's fine. Instead of one selector to access the name, we can make two selectors: one to report the name the way we'll display it on the screen: first-name last-name; and one to report the name the way we'll sort it with an algorithm: last-name comma first-name.
      +
      Omar: Right now, our program uses one text string to hold each contact's name, but people have multiple names.
      +
      Jasmine: That's ok; we can still search them.
      +
      Omar: It's fine for displaying names on the screen, but it would make it hard to sort the contacts by last name.
      +
      Jasmine: We could use another list to separate the last name from the first name.
      +
      Omar: If we change the ADT though, we'll have have to adapt all the blocks that use it...
      +
      Jasmine:That's fine. Instead of one selector to access the name, we can make two selectors: one to report the name the way we'll display it on the screen: first-name last-name; and one to report the name the way we'll sort it with an algorithm: last-name comma first-name.
      diff --git a/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.html b/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.html index 131d8d8e2c..4405d89067 100644 --- a/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.html +++ b/cur/programming/3-lists/2-contact-list/unused-new-stuff/1-preparing-to-sort.html @@ -18,12 +18,12 @@

      Preparing to Sort

      -
      Gamal: Right now, our program uses one text string to hold each contact's name, but people have multiple names.
      -
      Betsy: That's ok; we can still search them.
      -
      Gamal: It's fine for displaying names on the screen, but it would make it hard to sort the contacts by last name.
      -
      Betsy: We could use another list to separate the last name from the first name.
      -
      Gamal: If we change the ADT though, we'll have have to adapt all the blocks that use it...
      -
      Betsy:That's fine. Instead of one selector to access the name, we can make two selectors: one to report the name the way we'll display it on the screen: first-name last-name; and one to report the name the way we'll sort it with an algorithm: last-name comma first-name.
      +
      Omar: Right now, our program uses one text string to hold each contact's name, but people have multiple names.
      +
      Jasmine: That's ok; we can still search them.
      +
      Omar: It's fine for displaying names on the screen, but it would make it hard to sort the contacts by last name.
      +
      Jasmine: We could use another list to separate the last name from the first name.
      +
      Omar: If we change the ADT though, we'll have have to adapt all the blocks that use it...
      +
      Jasmine:That's fine. Instead of one selector to access the name, we can make two selectors: one to report the name the way we'll display it on the screen: first-name last-name; and one to report the name the way we'll sort it with an algorithm: last-name comma first-name.
      diff --git a/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.es.html b/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.es.html index 1509802d72..e645525e23 100644 --- a/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.es.html +++ b/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.es.html @@ -16,24 +16,24 @@

      Contact List Data: Names

      Unlike, for example, a video game or an art project, a contact list app is all about data. In this lab as a whole, you'll create a contact abstract data type, with components such as name, address, phone, birthday, and so on, much as in Unit 2 Lab 2: Checking Each Quiz Answer where you created a quiz item ADT. But in this case, each component of a contact will itself be an ADT. On this page you'll start with names.

      -
      Alphie: Hmm, that paragraph above says that name has to be an ADT, but I don't see why. Isn't a name just a text string? "Alphie North." "Betsy - Davies." "Sir James Paul McCartney."
      +
      Morgan: Hmm, that paragraph above says that name has to be an ADT, but I don't see why. Isn't a name just a text string? "Morgan Preston." "Jasmine + Williams." "Sir James Paul McCartney."
      - Betsy: Let's look at the list on your phone.
      + Jasmine: Let's look at the list on your phone.
      list of names
      Ah, they're sorted by last name, even though it's not the beginning of the name text.
      - Alphie: So are you saying we should have a name data type made out of a + Morgan: So are you saying we should have a name data type made out of a first name and a last name? Then it'd look just like what we did for point:
      point = list    name, first: (first) last: (last):  report (list first last)
      Some other students start looking over their shoulders.
      Mei: Do you want your app to work in China? People there put their family name first, so Sun Yìxiān is in the Sun family, and would be in the S part of your name list, not the Y part.
      -
      Alphie: So, you're saying we need two different name types, with different constructors and selectors?
      -
      Gamal: At least two. After you finish your program, I'll tell you about names in Iceland (given name first, but sorted on given name, not family name) and Myanmar (no family name at all)!
      -
      Alphie puts his head in his hands and groans.
      -
      Betsy: Nah, it doesn't have to be that bad. We'll just have one name type, but it'll have variants, and we'll include a type tag in with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Gamal can add more variants later if he wants.
      +
      Morgan: So, you're saying we need two different name types, with different constructors and selectors?
      +
      Omar: At least two. After you finish your program, I'll tell you about names in Iceland (given name first, but sorted on given name, not family name) and Myanmar (no family name at all)!
      +
      Morgan puts his head in his hands and groans.
      +
      Jasmine: Nah, it doesn't have to be that bad. We'll just have one name type, but it'll have variants, and we'll include a type tag in with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Omar can add more variants later if he wants.
      @@ -73,23 +73,23 @@

      Contact List Data: Names

      -
      Alphie: Okay, now I guess we have to make selectors, right?
      +
      Morgan: Okay, now I guess we have to make selectors, right?
      name type (name): report item 1 of (name) given name (name): report item 2 of (name) family name (name):  report item 3 (name) -
      Gamal: Don't call the first one name type. We're going to need the same type selector for other ADTs also, so call it type tag.
      -
      Alphie: How do you know?
      -
      Gamal: I read ahead in the curriculum!
      -
      Alphie and Betsy groan.
      +
      Omar: Don't call the first one name type. We're going to need the same type selector for other ADTs also, so call it type tag.
      +
      Morgan: How do you know?
      +
      Omar: I read ahead in the curriculum!
      +
      Morgan and Jasmine groan.
        -
      1. Make the three selectors, using Gamal's suggested name for the first one.
      2. +
      3. Make the three selectors, using Omar's suggested name for the first one.
      -
      Betsy: But I'm not sure how this variant idea is going to help. Mostly, the rest of the program isn't going to want the family name alone. It's going to want the entire name, either in display order or in sorting order, so aren't we going to need blocks like given first name in sorted form (name) and so on?
      -
      Alphie: Oh, hang on, you're thinking of it as a selector just for one variant (given-first names), but we can simplify a bit by thinking of it as a selector for all names, name (sorted form) ( ). The definition is a little more complicated, but the rest of the program will be able to use it without caring what kind of variant it has.
      +
      Jasmine: But I'm not sure how this variant idea is going to help. Mostly, the rest of the program isn't going to want the family name alone. It's going to want the entire name, either in display order or in sorting order, so aren't we going to need blocks like given first name in sorted form (name) and so on?
      +
      Morgan: Oh, hang on, you're thinking of it as a selector just for one variant (given-first names), but we can simplify a bit by thinking of it as a selector for all names, name (sorted form) ( ). The definition is a little more complicated, but the rest of the program will be able to use it without caring what kind of variant it has.
      @@ -97,7 +97,7 @@

      Contact List Data: Names

    17. Finish this definition:
      name (sorted form) (name):  if ((type tag (name)) = [given-first]) report (join (family name (name)) [, ] (given name (name)))
      - Note that for a given-first name we put a comma and space between the names, "Davies, Betsy"; there won't be a comma for family-first names ("Sun Yìxiān"). + Note that for a given-first name we put a comma and space between the names, "Williams, Jasmine"; there won't be a comma for family-first names ("Sun Yìxiān").
    18. Similarly, define name (display form) ( ).
    @@ -105,11 +105,11 @@

    Contact List Data: Names

    - Betsy: Oh, I see! Now in the rest of the program we can just say things like
    + Jasmine: Oh, I see! Now in the rest of the program we can just say things like
    for each (contact) of (contact list)  say (name (display form) (contact name (contact))) for 2 secs
    - Alphie: It's even better than that! This is where the magic comes in. When we make the Contact ADT, we give it a type tag too:
    + Morgan: It's even better than that! This is where the magic comes in. When we make the Contact ADT, we give it a type tag too:
    contact, name: (name) address: (address) phone: (phone):   report (list [contact] (name) (address) (phone))
    Then, since contacts have type tags, we can make the same selector blocks work for them, too:
    name (display form) (object):  if ... if ((type tag (object)) = contact) report (name (display form) (contact name (object))) ...
    diff --git a/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.html b/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.html index 42bb41bbfe..b063dc1929 100644 --- a/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.html +++ b/cur/programming/3-lists/2-contact-list/unused-new-stuff/5-name-adt.html @@ -16,24 +16,24 @@

    Contact List Data: Names

    Unlike, for example, a video game or an art project, a contact list app is all about data. In this lab as a whole, you'll create a contact abstract data type, with components such as name, address, phone, birthday, and so on, much as in Unit 2 Lab 2: Checking Each Quiz Answer where you created a quiz item ADT. But in this case, each component of a contact will itself be an ADT. On this page you'll start with names.

    -
    Alphie: Hmm, that paragraph above says that name has to be an ADT, but I don't see why. Isn't a name just a text string? "Alphie North." "Betsy - Davies." "Sir James Paul McCartney."
    +
    Morgan: Hmm, that paragraph above says that name has to be an ADT, but I don't see why. Isn't a name just a text string? "Morgan Preston." "Jasmine + Williams." "Sir James Paul McCartney."
    - Betsy: Let's look at the list on your phone.
    + Jasmine: Let's look at the list on your phone.
    list of names
    Ah, they're sorted by last name, even though it's not the beginning of the name text.
    - Alphie: So are you saying we should have a name data type made out of a + Morgan: So are you saying we should have a name data type made out of a first name and a last name? Then it'd look just like what we did for point:
    point = list    name, first: (first) last: (last):  report (list first last)
    Some other students start looking over their shoulders.
    Mei: Do you want your app to work in China? People there put their family name first, so Sun Yìxiān is in the Sun family, and would be in the S part of your name list, not the Y part.
    -
    Alphie: So, you're saying we need two different name types, with different constructors and selectors?
    -
    Gamal: At least two. After you finish your program, I'll tell you about names in Iceland (given name first, but sorted on given name, not family name) and Myanmar (no family name at all)!
    -
    Alphie puts his head in his hands and groans.
    -
    Betsy: Nah, it doesn't have to be that bad. We'll just have one name type, but it'll have variants, and we'll include a type tag in with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Gamal can add more variants later if he wants.
    +
    Morgan: So, you're saying we need two different name types, with different constructors and selectors?
    +
    Omar: At least two. After you finish your program, I'll tell you about names in Iceland (given name first, but sorted on given name, not family name) and Myanmar (no family name at all)!
    +
    Morgan puts his head in his hands and groans.
    +
    Jasmine: Nah, it doesn't have to be that bad. We'll just have one name type, but it'll have variants, and we'll include a type tag in with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Omar can add more variants later if he wants.
    @@ -73,23 +73,23 @@

    Contact List Data: Names

    -
    Alphie: Okay, now I guess we have to make selectors, right?
    +
    Morgan: Okay, now I guess we have to make selectors, right?
    name type (name): report item 1 of (name) given name (name): report item 2 of (name) family name (name):  report item 3 (name) -
    Gamal: Don't call the first one name type. We're going to need the same type selector for other ADTs also, so call it type tag.
    -
    Alphie: How do you know?
    -
    Gamal: I read ahead in the curriculum!
    -
    Alphie and Betsy groan.
    +
    Omar: Don't call the first one name type. We're going to need the same type selector for other ADTs also, so call it type tag.
    +
    Morgan: How do you know?
    +
    Omar: I read ahead in the curriculum!
    +
    Morgan and Jasmine groan.
      -
    1. Make the three selectors, using Gamal's suggested name for the first one.
    2. +
    3. Make the three selectors, using Omar's suggested name for the first one.
    -
    Betsy: But I'm not sure how this variant idea is going to help. Mostly, the rest of the program isn't going to want the family name alone. It's going to want the entire name, either in display order or in sorting order, so aren't we going to need blocks like given first name in sorted form (name) and so on?
    -
    Alphie: Oh, hang on, you're thinking of it as a selector just for one variant (given-first names), but we can simplify a bit by thinking of it as a selector for all names, name (sorted form) ( ). The definition is a little more complicated, but the rest of the program will be able to use it without caring what kind of variant it has.
    +
    Jasmine: But I'm not sure how this variant idea is going to help. Mostly, the rest of the program isn't going to want the family name alone. It's going to want the entire name, either in display order or in sorting order, so aren't we going to need blocks like given first name in sorted form (name) and so on?
    +
    Morgan: Oh, hang on, you're thinking of it as a selector just for one variant (given-first names), but we can simplify a bit by thinking of it as a selector for all names, name (sorted form) ( ). The definition is a little more complicated, but the rest of the program will be able to use it without caring what kind of variant it has.
    @@ -97,7 +97,7 @@

    Contact List Data: Names

  • Finish this definition:
    name (sorted form) (name):  if ((type tag (name)) = [given-first]) report (join (family name (name)) [, ] (given name (name)))
    - Note that for a given-first name we put a comma and space between the names, "Davies, Betsy"; there won't be a comma for family-first names ("Sun Yìxiān"). + Note that for a given-first name we put a comma and space between the names, "Williams, Jasmine"; there won't be a comma for family-first names ("Sun Yìxiān").
  • Similarly, define name (display form) ( ).
  • @@ -105,11 +105,11 @@

    Contact List Data: Names

    - Betsy: Oh, I see! Now in the rest of the program we can just say things like
    + Jasmine: Oh, I see! Now in the rest of the program we can just say things like
    for each (contact) of (contact list)  say (name (display form) (contact name (contact))) for 2 secs
    - Alphie: It's even better than that! This is where the magic comes in. When we make the Contact ADT, we give it a type tag too:
    + Morgan: It's even better than that! This is where the magic comes in. When we make the Contact ADT, we give it a type tag too:
    contact, name: (name) address: (address) phone: (phone):   report (list [contact] (name) (address) (phone))
    Then, since contacts have type tags, we can make the same selector blocks work for them, too:
    name (display form) (object):  if ... if ((type tag (object)) = contact) report (name (display form) (contact name (object))) ...
    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 c5bfb0de20..a62a5ae9ab 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 @@ -89,10 +89,10 @@

    Drawing 3D Shapes

    Using Map for Algebraic Functions

    -
    Alphie and Betty are talking about another example of using map to compute some function of every item of a list:
    +
    Morgan and Betty are talking about another example of using map to compute some function of every item of a list:
    Betty: That gray ring after the word "map" means a function goes in there. A function? Like in algebra? What about the function f defined by f(n) = 3n + 7?
    - Alphie: Well, I don't think the function has to be mathematical. We used plural with words. But let's try to put the function f in there. First I need to build f. Here you go:
    + Morgan: Well, I don't think the function has to be mathematical. We used plural with words. But let's try to put the function f in there. First I need to build f. Here you go:
    f(n)=3n+7
    Then we map f over a list, like 2, 0, and 7:
    f(n)=3n+7
    @@ -100,7 +100,7 @@

    Using Map for Algebraic Functions

    Betty: But I think I see an easier way. There's no need to name f. We leave the input in the expression blank, just like we did in join.
    Betty makes and clicks to see map 3x+7
    -
    Alphie: Let's see. 2 times 3 is 6. And then add 7. That's 13. Good, it worked!
    +
    Morgan: Let's see. 2 times 3 is 6. And then add 7. That's 13. Good, it worked!
    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 3bf9bdc13e..23a12b5b77 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 @@ -61,18 +61,18 @@

    Filtering Data

    Notice that this gray ring's inner boundary is hexagonal, which means you should use a predicate function, which is a function that reports true or false.
    -

    Alphie and Betty discuss using keep: KEEP ITEMS SUCH THAT (<predicate>) FROM (list)

    +

    Morgan and Betty discuss using keep: KEEP ITEMS SUCH THAT (<predicate>) FROM (list)

    -
    Alphie: Let's figure out how keep works. Which states do we want to keep?
    +
    Morgan: Let's figure out how keep works. Which states do we want to keep?
    Betty: Let's get a list of the states that begin and end with the same letter.
    -
    Alphie: So the list we're using is states. And letter 1 of the word needs to be the same as the last letter of the word.
    +
    Morgan: So the list we're using is states. And letter 1 of the word needs to be the same as the last letter of the word.
    Betty: Ok, so far we have this:
    keep(letter_1=letter_blank)from(states)
    -
    Alphie: We want the last letter of each word. The last letter depends on the length of the word.
    +
    Morgan: We want the last letter of each word. The last letter depends on the length of the word.
    Betty: Oh, right, so we can do this:
    keep(letter_1=letter(length))from(states)
    -
    Alphie: Each item of states goes in the empty spaces. So, let's try an example. I'll pick a state... "new york". Letter 1 of "new york" is "n".
    +
    Morgan: Each item of states goes in the empty spaces. So, let's try an example. I'll pick a state... "new york". Letter 1 of "new york" is "n".
    The space in "new york" counts as a character. So "new york" has a length of 8 and the eighth letter is "k".
    Betty: And that equals... Well, length of "new york" is 8, and letter 8 of "new york" is "k". The condition is false because "n" doesn't equal "k". So "new york" doesn't show up in the list. We'll keep only the states that have the same first and last letter.
    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 3e873d2cf5..08c9c416dd 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 @@ -18,11 +18,11 @@

    Processing Data in Lists

    Take turns speaking -
    Alphie and Betty are discussing the blocks they have been using with lists.
    +
    Morgan and Betty are discussing the blocks they have been using with lists.
    Click to review: map, keep, or combine with.
    -
    Alphie: The map block applies some function to each item of a list.
    +
    Morgan: The map block applies some function to each item of a list.
    Betty: The keep block lets you choose some items from a list and not others.
    -
    Alphie: And combine with takes an operation (like +) and a list. It combines all the items of the list into a single output using the operation. So, with +, it would give the sum of all the numebrs in the list.
    +
    Morgan: And combine with takes an operation (like +) and a list. It combines all the items of the list into a single output using the operation. So, with +, it would give the sum of all the numebrs in the list.
    Betty: Would we ever use all three of the functions together?
    @@ -34,20 +34,20 @@

    Processing Data in Lists

    -
    Alphie: I guess you could start with a list of numbers, keep the ones that were greater than 50, use map to add 10 to all of them, and then use combine with to add those new numbers up.
    +
    Morgan: I guess you could start with a list of numbers, keep the ones that were greater than 50, use map to add 10 to all of them, and then use combine with to add those new numbers up.
    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.
    +
    Morgan: 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...)
    +
    Morgan 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...))
    +
    Betty adds to Morgan's expression: combine(addition)itemsof(map(keep...))
      -
    1. Try Alphie and Betty's invention with a list of your own. Change the operations in combine with and map, too.
    2. +
    3. Try Morgan and Betty's invention with a list of your own. Change the operations in combine with and map, too.
    diff --git a/cur/programming/3-lists/old/4-combining-list-ops/old/2-when-you-really-need-to-loop.html b/cur/programming/3-lists/old/4-combining-list-ops/old/2-when-you-really-need-to-loop.html index 42fc4acf7a..bb4e2b6e9e 100755 --- a/cur/programming/3-lists/old/4-combining-list-ops/old/2-when-you-really-need-to-loop.html +++ b/cur/programming/3-lists/old/4-combining-list-ops/old/2-when-you-really-need-to-loop.html @@ -44,21 +44,21 @@

    When You Really Have to Loop

    The kids are also trying to figure out what to do with the blocks. I'd like us to solve that a bit better and give some varied and good examples. --PG Brian?? You are needed here.
    Trim this down. --MF
    Betty: Let's develop our algorithm, you know, the plan what we want the code to do.
    -
    Alphie: Ok. (Pauses to think.) Well, we need to compare each item to all the others, but we can't do that all at once, so we'll need to compare each one at a time...
    -
    Alphie: We could compare item 1 to item 2 and check that item 1 is less, and then compare item 2 to item 3 and check if item 2 is less, and then compare item 3 to item 4 and check that item 3 is less, all the way to the end. And, we'll know it's the end when we reach item "length of" for the list!
    +
    Morgan: Ok. (Pauses to think.) Well, we need to compare each item to all the others, but we can't do that all at once, so we'll need to compare each one at a time...
    +
    Morgan: We could compare item 1 to item 2 and check that item 1 is less, and then compare item 2 to item 3 and check if item 2 is less, and then compare item 3 to item 4 and check that item 3 is less, all the way to the end. And, we'll know it's the end when we reach item "length of" for the list!
    ok, and if we get "false" even once...
    (Interrupting) Then we know it's not increasing! -
    Alphie: Yeah, that works...
    +
    Morgan: Yeah, that works...
    They pause to think.
    -
    Alphie: You're saying we don't care about the item number, just the item itself. So we could use a for each loop. For each item in the list, we compare it to... what?
    +
    Morgan: You're saying we don't care about the item number, just the item itself. So we could use a for each loop. For each item in the list, we compare it to... what?
    Betty: What if we make a variable that keeps track of the highest number so far? Then we can check each item against that number, then reset the variable to equal to current item.
    -
    Alphie: Ok, here's what I have so far.
    +
    Morgan: Ok, here's what I have so far.
      -
    1. Alphie and Betty's script contains a mistake! For example, their script gives this result:
      +
    2. Morgan and Betty's script contains a mistake! For example, their script gives this result:
      The question mark at the end of increasing? is a convention for naming predicates (blocks that report either true-or-false).
      increasing(1,7,4,10)=true
      Click their script to open their project and fix their code.
    3. diff --git a/cur/programming/3-lists/optional-projects/old/3-modeling-sentence-structures.html b/cur/programming/3-lists/optional-projects/old/3-modeling-sentence-structures.html index 0b0dacca82..1bbeaf9281 100644 --- a/cur/programming/3-lists/optional-projects/old/3-modeling-sentence-structures.html +++ b/cur/programming/3-lists/optional-projects/old/3-modeling-sentence-structures.html @@ -45,10 +45,10 @@

      Modeling Sentence Structures

      -
      Alphie and Betty are trying to use the lists of words to build sentences.
      +
      Morgan and Betty are trying to use the lists of words to build sentences.
      Betty: The sentence "the elephant climbs" is just an example. Let's build a block that joins any determiner with a noun and a verb.
      They make: join words(articles, nouns, verbs)
      -
      Alphie: Looks good to me. Let's run it and see what happens.
      +
      Morgan: Looks good to me. Let's run it and see what happens.
      Betty clicks and they see: all articles nouns verbs joined
      Betty: What? Oh, these are all the words in those lists. We want just one item from each of the three lists.
      diff --git a/cur/programming/3-lists/optional-projects/old/4-graphing-functions.html b/cur/programming/3-lists/optional-projects/old/4-graphing-functions.html index 0a1cef079f..ef954e7939 100755 --- a/cur/programming/3-lists/optional-projects/old/4-graphing-functions.html +++ b/cur/programming/3-lists/optional-projects/old/4-graphing-functions.html @@ -35,8 +35,8 @@

      Graphing Functions

    diff --git a/cur/programming/5-algorithms/1-searching-lists/old/2-improving-search.html b/cur/programming/5-algorithms/1-searching-lists/old/2-improving-search.html index 9f55b0784c..c4957bafb0 100755 --- a/cur/programming/5-algorithms/1-searching-lists/old/2-improving-search.html +++ b/cur/programming/5-algorithms/1-searching-lists/old/2-improving-search.html @@ -27,14 +27,14 @@

    Analyzing and Improving Searches

    Do we need this commented out text? --MF, 6/17/20
    - @@ -58,18 +58,18 @@

    Searching in Sorted Data

    Typically, sorted lists are from lowest to highest. You'll create a block that sorts a list of numbers in Unit 8, Sorting a List.
    -
    Alphie: If the list is sorted, we could look at the middle element of the list and see if our number is in the first or last half of the list. That would save time.
    -
    Betsy: This feels a lot like the guessing game we built—I pick a number and the computer tries to guess it by splitting the list in half with each guess.
    +
    Morgan: If the list is sorted, we could look at the middle element of the list and see if our number is in the first or last half of the list. That would save time.
    +
    Jasmine: This feels a lot like the guessing game we built—I pick a number and the computer tries to guess it by splitting the list in half with each guess.
    Brian wants us to scrub the list name "awful list" from the curriculum, and Mary agrees. --MF, 2/22/18
    awful-list {1:1, 1:7, 3:8, 4:9, 5:11, 6:12, 7:21, 8:22, 9:23, 10:24, 11:73, 12:73, 13:96, 14:99}
    - Alphie: But in that one, the computer guessed a number that we picked. Now we want it to find a number in a list and report its position. It should work like this:
    + Morgan: But in that one, the computer guessed a number that we picked. Now we want it to find a number in a list and report its position. It should work like this:
    position of number (11) in sorted list (awful list) reporting 5
    -
    Betsy: Yes, but it still feels the same. It should have the same guts as the guessing game.
    +
    Jasmine: Yes, but it still feels the same. It should have the same guts as the guessing game.
    -
    Betsy's last remark is a version of abstraction. Betsy noticed that position in sorted list and the number guesser algorithm should have the same overall structure. +
    Jasmine's last remark is a version of abstraction. Jasmine noticed that position in sorted list and the number guesser algorithm should have the same overall structure.
    diff --git a/cur/programming/5-algorithms/2-simulation/old/2-exploring-traffic-simulation.html b/cur/programming/5-algorithms/2-simulation/old/2-exploring-traffic-simulation.html index bacd090cf9..eb38d910fa 100755 --- a/cur/programming/5-algorithms/2-simulation/old/2-exploring-traffic-simulation.html +++ b/cur/programming/5-algorithms/2-simulation/old/2-exploring-traffic-simulation.html @@ -15,7 +15,7 @@

    Exploring Your Traffic Simulation

    -
    Gamal: I bet it'll behave differently if ....
    +
    Omar: I bet it'll behave differently if ....
    diff --git a/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.es.html b/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.es.html index 65cb9ac44e..cf5859f433 100755 --- a/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.es.html +++ b/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.es.html @@ -48,8 +48,8 @@

    Prueba por contradicción

    -
    Betsy, Gamal y Alphie están conversando sobre el problema anterior.
    -
    Betsy: Estoy bastante segura de que Zoey es portavoz de la verdad, pero no sé cómo demostrarlo.
    +
    Jasmine, Omar y Morgan están conversando sobre el problema anterior.
    +
    Jasmine: Estoy bastante segura de que Zoey es portavoz de la verdad, pero no sé cómo demostrarlo.

    Una prueba por contradicción (proof by contradition) es una prueba de dos pasos para saber si algo es falso que se realiza: @@ -59,11 +59,11 @@

    Prueba por contradicción

    -
    Gamal: A veces es más fácil demostrar que algo es falso que demostrar que algo es verdadero. Entonces, asumamos lo contrario de lo que quieres probar, y veamos a dónde nos lleva. Supongamos que Zoey es portavoz de la mentira.
    -
    Betsy: Bueno. Entonces, si Diego es portavoz de la verdad, entonces lo que dijo es cierto, y son de la misma familia, los que dicen la verdad. Pero supusimos que Zoey es portavoz de la mentira, por lo que en realidad son de diferentes familias, por lo que Diego no puede ser portavoz de la verdad.
    -
    Alphie: Entonces, Diego tiene que ser portavoz de la mentira.
    -
    Gamal: ¡Pero eso tampoco funcionará! Si Diego es portavoz de la mentira, entonces lo que dijo es falso, y son de diferentes familias. Pero ambos son portavoces de la mentira, por lo que en realidad están en la misma familia, por lo que Diego tampoco puede ser portavoz de la mentira.
    -
    Betsy: No importa de qué familia sea Diego, nuestra suposición de que Zoey es portavoz de la mentira nos llevó a una contradicción. Zoey no puede ser portavoz de la mentira, por lo que tiene que ser portavoz de la verdad. Lo probamos.
    +
    Omar: A veces es más fácil demostrar que algo es falso que demostrar que algo es verdadero. Entonces, asumamos lo contrario de lo que quieres probar, y veamos a dónde nos lleva. Supongamos que Zoey es portavoz de la mentira.
    +
    Jasmine: Bueno. Entonces, si Diego es portavoz de la verdad, entonces lo que dijo es cierto, y son de la misma familia, los que dicen la verdad. Pero supusimos que Zoey es portavoz de la mentira, por lo que en realidad son de diferentes familias, por lo que Diego no puede ser portavoz de la verdad.
    +
    Morgan: Entonces, Diego tiene que ser portavoz de la mentira.
    +
    Omar: ¡Pero eso tampoco funcionará! Si Diego es portavoz de la mentira, entonces lo que dijo es falso, y son de diferentes familias. Pero ambos son portavoces de la mentira, por lo que en realidad están en la misma familia, por lo que Diego tampoco puede ser portavoz de la mentira.
    +
    Jasmine: No importa de qué familia sea Diego, nuestra suposición de que Zoey es portavoz de la mentira nos llevó a una contradicción. Zoey no puede ser portavoz de la mentira, por lo que tiene que ser portavoz de la verdad. Lo probamos.
    @@ -74,19 +74,19 @@

    Prueba por contradicción

    -
    Betsy y Gamal están explorando sus propias declaraciones lógicas.
    -
    Betsy: La declaración que estoy haciendo en este momento es falsa.
    -
    Gamal: (Piensa por un momento) ¡Espera! ¿¡Qué!?
    +
    Jasmine y Omar están explorando sus propias declaraciones lógicas.
    +
    Jasmine: La declaración que estoy haciendo en este momento es falsa.
    +
    Omar: (Piensa por un momento) ¡Espera! ¿¡Qué!?
      -
    1. Betsy afirma que su declaración es falsa. ¿Qué piensas ? Explica tu pensamiento claramente.
    2. +
    3. Jasmine afirma que su declaración es falsa. ¿Qué piensas ? Explica tu pensamiento claramente.
    -
    Gamal: Eso es muy inteligente, Betsy. Tu declaración no puede ser verdadera, y no puede ser falsa. Entonces, ni portavoz de la verdad ni portavoz de la mentira podrían decir eso.
    +
    Omar: Eso es muy inteligente, Jasmine. Tu declaración no puede ser verdadera, y no puede ser falsa. Entonces, ni portavoz de la verdad ni portavoz de la mentira podrían decir eso.
    diff --git a/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.html b/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.html index 5dabef6123..ce39c36b51 100755 --- a/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.html +++ b/cur/programming/5-algorithms/4-unsolvable-undecidable/1-logical-inconsistency.html @@ -48,8 +48,8 @@

    Proof by Contradiction

    -
    Betsy, Gamal, and Alphie are considering the problem above.
    -
    Betsy: I'm pretty sure Zoey is a Truth-teller, but I don't know how to prove it.
    +
    Jasmine, Omar, and Morgan are considering the problem above.
    +
    Jasmine: I'm pretty sure Zoey is a Truth-teller, but I don't know how to prove it.

    A proof by contradiction is a two-step proof that a statement is false, which is done by @@ -59,11 +59,11 @@

    Proof by Contradiction

    -
    Gamal: Sometimes it's easier to prove that something is false than to prove that something is true. So let's assume the opposite of what you want to prove, and see where that leads us. Let's assume that Zoey is a False-teller.
    -
    Betsy: Okay. So if Diego is a Truth-teller, then what he said is true, and they are from the same family, the Truth-tellers. But we assumed that Zoey is a False-teller, so they're actually from different families, and so Diego can't be a Truth-teller.
    -
    Alphie: So, Diego has to be a False-teller.
    -
    Gamal: But that won't work either! If Diego is a False-teller, then what he said is false, and they are from different families. But they are both False-tellers, so they're actually in the same family, and so Diego can't be a False-teller either.
    -
    Betsy: No matter what family Diego is from, our assumption that Zoey is a False-teller led us to a contradiction. Zoey can't be a False-teller, so has to be a Truth-teller. We proved it.
    +
    Omar: Sometimes it's easier to prove that something is false than to prove that something is true. So let's assume the opposite of what you want to prove, and see where that leads us. Let's assume that Zoey is a False-teller.
    +
    Jasmine: Okay. So if Diego is a Truth-teller, then what he said is true, and they are from the same family, the Truth-tellers. But we assumed that Zoey is a False-teller, so they're actually from different families, and so Diego can't be a Truth-teller.
    +
    Morgan: So, Diego has to be a False-teller.
    +
    Omar: But that won't work either! If Diego is a False-teller, then what he said is false, and they are from different families. But they are both False-tellers, so they're actually in the same family, and so Diego can't be a False-teller either.
    +
    Jasmine: No matter what family Diego is from, our assumption that Zoey is a False-teller led us to a contradiction. Zoey can't be a False-teller, so has to be a Truth-teller. We proved it.
    @@ -74,19 +74,19 @@

    Proof by Contradiction

    -
    Betsy and Gamal are exploring logical statements of their own.
    -
    Betsy: The statement I'm making right now is false.
    -
    Gamal: (Thinks for a moment) Wait! What?!?
    +
    Jasmine and Omar are exploring logical statements of their own.
    +
    Jasmine: The statement I'm making right now is false.
    +
    Omar: (Thinks for a moment) Wait! What?!?
      -
    1. Betsy claims her statement is false. What do you think? Explain your thinking clearly.
    2. +
    3. Jasmine claims her statement is false. What do you think? Explain your thinking clearly.
    -
    Gamal: That's very clever, Betsy. Your statement can't be true, and it can't be false. So neither a Truth-teller nor a False-teller could say that.
    +
    Omar: That's very clever, Jasmine. Your statement can't be true, and it can't be false. So neither a Truth-teller nor a False-teller could say that.
    diff --git a/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.es.html b/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.es.html index 167a154b4a..f8464da3e2 100755 --- a/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.es.html +++ b/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.es.html @@ -18,7 +18,7 @@

    Un problema indecidible

    En esta página, considerarás un problema que no puede tener una respuesta.

    -

    En este punto del curso, has experimentado la frustración de depurar un programa. Sería genial si hubiera un programa de depuración de propósito general que pudiera leer cualquier código y determinar si había errores. Desafortunadamente, podemos usar prueba por contradicción (como hicieron Alphie, Betsy y Gamal en la página anterior) para demostrar que esto no se puede hacer.

    +

    En este punto del curso, has experimentado la frustración de depurar un programa. Sería genial si hubiera un programa de depuración de propósito general que pudiera leer cualquier código y determinar si había errores. Desafortunadamente, podemos usar prueba por contradicción (como hicieron Morgan, Jasmine y Omar en la página anterior) para demostrar que esto no se puede hacer.

    Primero, asumiremos que es posible escribir una función para determinar si hay bucles infinitos en un programa (situaciones en las que una función se ejecuta para siempre sin devolver un valor). Luego, utilizaremos esa función en un programa especialmente diseñado para crear una contradicción (una incompatibilidad lógica) para demostrar que la suposición es incorrecta—no puede existir un programa de depuración de uso general. "Este programa tiene errores" es un problema indecidible; nunca se puede construir un algoritmo que siempre lo resuelva correctamente para cada programa.

    Un bucle infinito (infinite loop) es una secuencia de instrucciones de computadora que se repite para siempre.

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

    Construir un programa para el cual ¿detener? prueba(reportero){si(¿detener?(reportero)(reportero){por siempre{}}sino{reportar(No importa qué valor es reportado.)}}

    El bloque por siempre en este script crea un bucle infinito. Si el código de prueba termina en esta parte de la declaración si, nunca reportara nada. Entonces, entonces si prueba se detendrá el mismo depende de la salida del predicado ¿detener? en la declaración si dentro de él.

    -

    La expresion ¿detener? (reportero) (reportero) pregunta qué sucederá si llamamos a la función de entrada (reportar) con el mismo como su propia entrada. Esto es similar a cuando Betsy hizo una declaración sobre la declaración que estaba haciendo, cuando dijo: "La declaración que estoy haciendo en este momento es falsa".

    +

    La expresion ¿detener? (reportero) (reportero) pregunta qué sucederá si llamamos a la función de entrada (reportar) con el mismo como su propia entrada. Esto es similar a cuando Jasmine hizo una declaración sobre la declaración que estaba haciendo, cuando dijo: "La declaración que estoy haciendo en este momento es falsa".

    Actividades desafiantes @@ -107,7 +107,7 @@

    Construir un programa para el cual ¿detener?

    Uso de autorreferencia para conducir a la contradicción

    - Para hacer que la situación sea exactamente como lo que dijo Betsy ("La declaración que estoy haciendo en este momento es falsa"), llamaremos a prueba dentro de sí mismo:
    + Para hacer que la situación sea exactamente como lo que dijo Jasmine ("La declaración que estoy haciendo en este momento es falsa"), llamaremos a prueba dentro de sí mismo:
    prueba(prueba())
    Ahora, la instrucción si dentro del bloque prueba preguntará si prueba se detendrá (no se ejecutará para siempre) si se llama con prueba como su entrada. El predicado en la instrucción si se convertirá en ¿detener? (prueba) (prueba).

    I took out class="indent" on this picture so that it'd fit in the window. If you don't like that, figure out how to shrink the picture without fuzzing it up. -bh
    OK, leaving this comment here to remind me for another day. --MF, 2/1/18
    diff --git a/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.html b/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.html index b6b9f17344..feb6291f3b 100755 --- a/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.html +++ b/cur/programming/5-algorithms/4-unsolvable-undecidable/2-halting-problem.html @@ -18,7 +18,7 @@

    An Undecidable Problem

    On this page, you will consider a problem that can't have an answer.

    -

    By this point in the course, you've experienced the frustration of debugging a program. It would be great if there were a general-purpose debugging program that could read any code and determine if there were bugs. Unfortunately, we can use proof by contradiction (as Alphie, Betsy, and Gamal did on the previous page) to prove that this can't be done.

    +

    By this point in the course, you've experienced the frustration of debugging a program. It would be great if there were a general-purpose debugging program that could read any code and determine if there were bugs. Unfortunately, we can use proof by contradiction (as Morgan, Jasmine, and Omar did on the previous page) to prove that this can't be done.

    First, we'll assume that it's possible to write a function to determine if there are infinite loops in a program (situations in which a function runs forever without reporting a value). Then, we'll use that function in a program especially designed to create a contradiction (a logical incompatibility) to prove that the assumption is wrong—no general-purpose debugging program can exist. "Does this program have bugs" is an undecidable problem; no algorithm can ever be constructed that always solves it correctly for every program.

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

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

    Constructing a Program For Which Halts? Won't tester(reporter){if(halts?(reporter)(reporter){forever{}}else{report(It doesn't matter what value is reported.)}}

    The forever block in this script creates an infinite loop. If the tester code ends up in this part of the if statement, it will never report anything. So whether tester itself will halt depends on the output of the halts? predicate in the if statement inside it.

    -

    The expression halts? (reporter) (reporter) asks what will happen if we call the input function (reporter) with itself as its own input. This is similar to when Betsy made a statement about the statement she was making, when she said, "The statement I'm making right now is false."

    +

    The expression halts? (reporter) (reporter) asks what will happen if we call the input function (reporter) with itself as its own input. This is similar to when Jasmine made a statement about the statement she was making, when she said, "The statement I'm making right now is false."

    Tough Stuff @@ -107,7 +107,7 @@

    Constructing a Program For Which Halts? Won't

    Using Self-Reference to Lead to Contradiction

    - To make the situation exactly like what Betsy said ("The statement I'm making right now is false."), we'll call tester on itself:
    + To make the situation exactly like what Jasmine said ("The statement I'm making right now is false."), we'll call tester on itself:
    tester(tester())
    Now, the if statement inside the tester block will ask if tester will halt (not run forever) if it's called with tester as its input. The predicate in the if statement will become halts? (tester) (tester).

    I took out class="indent" on this picture so that it'd fit in the window. If you don't like that, figure out how to shrink the picture without fuzzing it up. -bh
    OK, leaving this comment here to remind me for another day. --MF, 2/1/18
    diff --git a/cur/programming/5-algorithms/4-unsolvable-undecidable/old/old-2-halting-problem.html b/cur/programming/5-algorithms/4-unsolvable-undecidable/old/old-2-halting-problem.html index a17d970dc2..6b4c4edbb5 100644 --- a/cur/programming/5-algorithms/4-unsolvable-undecidable/old/old-2-halting-problem.html +++ b/cur/programming/5-algorithms/4-unsolvable-undecidable/old/old-2-halting-problem.html @@ -15,21 +15,21 @@

    An Undecidable Problem

    -
    Alphie: I've been thinking about Betsy's impossible statement "The statement I'm making right now is false."
    -
    Gamal: You?! Thinking? OK, just kidding.
    -
    Alphie: Well, I was hungry then. But it's interesting. Betsy's statement was, well, weird. As I say, I've been thinking about it. Suppose I wrote a block with repeat until in it, and when it was finished, it'd give me some answer I wanted. Is there some way I could just analyze the code without actually running it, to determine if it would ever stop?
    -
    Betsy: You mean a "test" like we invented to figure out if Adam was a Truthteller or not?
    -
    Alphie: Yeah. Imagine this great program that could look at other programs and figure out if they'd stop or not.
    -
    Gamal: Why would you care? Why not just run it?
    -
    Alphie: Well, yeah, but suppose I knew that the calculation would take a long time even if it is going to succeed, but I'd want to avoid wasting all that time if I could know, in advance, that it would never succeed.
    -
    Betsy: So.... You'd want to test the algorithm first to see if it even has a chance of succeeding.
    -
    Alphie: Yup! Is there some general program that could look at any other I give it, and report whether that program will end or not?
    -
    Betsy: I wonder if that's going to turn out a bit like my claim "The statement I'm making right now is false."
    +
    Morgan: I've been thinking about Jasmine's impossible statement "The statement I'm making right now is false."
    +
    Omar: You?! Thinking? OK, just kidding.
    +
    Morgan: Well, I was hungry then. But it's interesting. Jasmine's statement was, well, weird. As I say, I've been thinking about it. Suppose I wrote a block with repeat until in it, and when it was finished, it'd give me some answer I wanted. Is there some way I could just analyze the code without actually running it, to determine if it would ever stop?
    +
    Jasmine: You mean a "test" like we invented to figure out if Adam was a Truthteller or not?
    +
    Morgan: Yeah. Imagine this great program that could look at other programs and figure out if they'd stop or not.
    +
    Omar: Why would you care? Why not just run it?
    +
    Morgan: Well, yeah, but suppose I knew that the calculation would take a long time even if it is going to succeed, but I'd want to avoid wasting all that time if I could know, in advance, that it would never succeed.
    +
    Jasmine: So.... You'd want to test the algorithm first to see if it even has a chance of succeeding.
    +
    Morgan: Yup! Is there some general program that could look at any other I give it, and report whether that program will end or not?
    +
    Jasmine: I wonder if that's going to turn out a bit like my claim "The statement I'm making right now is false."
      -
    1. Alphie has asked a famous question in computer science. It will take discussion! Think about it and talk with others. Can the program he wants be designed?
    2. +
    3. Morgan has asked a famous question in computer science. It will take discussion! Think about it and talk with others. Can the program he wants be designed?
    diff --git a/cur/programming/5-algorithms/old/3-timing-experiments/1-comparing-algorithms.html b/cur/programming/5-algorithms/old/3-timing-experiments/1-comparing-algorithms.html index 512060cbe5..ee04aed834 100755 --- a/cur/programming/5-algorithms/old/3-timing-experiments/1-comparing-algorithms.html +++ b/cur/programming/5-algorithms/old/3-timing-experiments/1-comparing-algorithms.html @@ -42,11 +42,11 @@

    Comparing Algorithms

    - Alphie and Betsy are creating algorithms that take a positive integer as input and report the sum of all integers from 1 to the input number, like this:
    + Morgan and Jasmine are creating algorithms that take a positive integer as input and report the sum of all integers from 1 to the input number, like this:
    sum from 1 to (13) reporting 91
    - Their two different approaches always give the same outputs for the same inputs. Alphie and Betsy are discussing their different approaches. + Their two different approaches always give the same outputs for the same inputs. Morgan and Jasmine are discussing their different approaches.
    -
    Alphie: I made two new blocks. First, I created a reporter to list of all the integers between and including two integers, and then I used combine to add up the list.
    +
    Morgan: I made two new blocks. First, I created a reporter to list of all the integers between and including two integers, and then I used combine to add up the list.
    -
    Alphie: I noticed a pattern in the table. Each number of segments is one less than a power of 2.
    -
    Betsy: What does your code look like?
    -
    Alphie: I used a for loop to build the power of 2, then I subtracted 1 at the end:
    +
    Morgan: I noticed a pattern in the table. Each number of segments is one less than a power of 2.
    +
    Jasmine: What does your code look like?
    +
    Morgan: I used a for loop to build the power of 2, then I subtracted 1 at the end:
    segments in tree(n){script variables(answer); set(answer) to (1); for (i=1 to n){set(answer) to (answer*2)} report(answer-1)}
    -
    Alphie: At the end, the report block sends the final value. I put the last math operation there.
    -
    Betsy: Wow. Mine looks a lot different! I made the code look like the code for tree.
    -
    Alphie: Interesting... but I don't get it.
    -
    Betsy: Look back at the code for tree. We used recursion. We built a segment, turned, called tree to build a smaller tree, turned again, and then called tree again to build another, smaller tree.
    -
    Alphie: Cool! We can think about how that algorithm works to write the segments in tree reporter recursively. But we can ignore all the moving and turning parts, right? Let me give this a shot.
    -
    Betsy: Right! And don't forget: base cases are important!
    +
    Morgan: At the end, the report block sends the final value. I put the last math operation there.
    +
    Jasmine: Wow. Mine looks a lot different! I made the code look like the code for tree.
    +
    Morgan: Interesting... but I don't get it.
    +
    Jasmine: Look back at the code for tree. We used recursion. We built a segment, turned, called tree to build a smaller tree, turned again, and then called tree again to build another, smaller tree.
    +
    Morgan: Cool! We can think about how that algorithm works to write the segments in tree reporter recursively. But we can ignore all the moving and turning parts, right? Let me give this a shot.
    +
    Jasmine: Right! And don't forget: base cases are important!

    You've built and worked with recursive command blocks. Recursion can also be used in reporters.

    @@ -93,7 +93,7 @@

    Counting Trees

    • I had written n^m into U2 Math Tools, but it's now a primitive. --MF, 4/5/19
    -

    Here's Betsy's code for the segments in tree function:

    +

    Here's Jasmine's code for the segments in tree function:

    segments in tree(n){if(n=1){report(1)}else{report(1+2*segments in tree(n-1))}}
    The report block only connects to the blocks above it. That's because report returns the result of its input slot, immediately, as the output of the segments in tree reporter block. No further code is executed in a reporter after a report block.
    diff --git a/cur/programming/8-recursive-reporters/old/1-downup.html b/cur/programming/8-recursive-reporters/old/1-downup.html index cb6edf8f40..8033dfb7d5 100644 --- a/cur/programming/8-recursive-reporters/old/1-downup.html +++ b/cur/programming/8-recursive-reporters/old/1-downup.html @@ -24,7 +24,7 @@

    Downup

    -
    Alphie: Wait, isn't this unit supposed to be about reporters? But they want us to write a command!
    +
    Morgan: Wait, isn't this unit supposed to be about reporters? But they want us to write a command!
    Betty: Shhh!
    Click for a hint. diff --git a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.es.html b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.es.html index 84bdef580d..8f2c291a02 100644 --- a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.es.html +++ b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.es.html @@ -21,20 +21,20 @@

    Acerca del Triángulo de Pascal

    Pascal's Triangle is named (among Europeans and their cultural descendents) after the mathematician Blaise Pascal, who published a detailed study of the triangle in 1653, although the earliest surviving reference to the triangle comes from the Hindu mathematician Pingala, who lived some time around the 4th to 2nd century BCE.

    Within a row of Pascal's Triangle, count columns from zero, not one. Row 6, Column 2 is 15. The phrase 6 choose 2 refers to this number.
    - Numbers in Pascal's Triangle tell you how many ways you can choose column items from a set of row items. So, if you want to choose 2 people from 6 (say, Alphie, Betsy, Gamal, Delia, Eva, and Frank), there are 15 (row 6, column 2) ways to do it: + Numbers in Pascal's Triangle tell you how many ways you can choose column items from a set of row items. So, if you want to choose 2 people from 6 (say, Morgan, Jasmine, Omar, Delia, Eva, and Frank), there are 15 (row 6, column 2) ways to do it:
      -
    1. Alphie and Betsy
    2. -
    3. Alphie and Gamal
    4. -
    5. Alphie and Delia
    6. -
    7. Alphie and Eva
    8. -
    9. Alphie and Frank
    10. -
    11. Betsy and Gamal
    12. -
    13. Betsy and Delia
    14. -
    15. Betsy and Eva
    16. -
    17. Betsy and Frank
    18. -
    19. Gamal and Delia
    20. -
    21. Gamal and Eva
    22. -
    23. Gamal and Frank
    24. +
    25. Morgan and Jasmine
    26. +
    27. Morgan and Omar
    28. +
    29. Morgan and Delia
    30. +
    31. Morgan and Eva
    32. +
    33. Morgan and Frank
    34. +
    35. Jasmine and Omar
    36. +
    37. Jasmine and Delia
    38. +
    39. Jasmine and Eva
    40. +
    41. Jasmine and Frank
    42. +
    43. Omar and Delia
    44. +
    45. Omar and Eva
    46. +
    47. Omar and Frank
    48. Delia and Eva
    49. Delia and Frank
    50. Eva and Frank
    51. diff --git a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.html b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.html index 4d715944d3..4a4bc15bd3 100644 --- a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.html +++ b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/extras/1-pascal-context.html @@ -23,20 +23,20 @@

      About Pascal's Triangle

      Pascal's Triangle is named (among Europeans and their cultural descendents) after the mathematician Blaise Pascal, who published a detailed study of the triangle in 1653, although the earliest surviving reference to the triangle comes from the Hindu mathematician Pingala, who lived some time around the 4th to 2nd century BCE.

      Within a row of Pascal's Triangle, count columns from zero, not one. Row 6, Column 2 is 15. The phrase 6 choose 2 refers to this number.
      - Numbers in Pascal's Triangle tell you how many ways you can choose column items from a set of row items. So, if you want to choose 2 people from 6 (say, Alphie, Betsy, Gamal, Delia, Eva, and Frank), there are 15 (row 6, column 2) ways to do it: + Numbers in Pascal's Triangle tell you how many ways you can choose column items from a set of row items. So, if you want to choose 2 people from 6 (say, Morgan, Jasmine, Omar, Delia, Eva, and Frank), there are 15 (row 6, column 2) ways to do it:
        -
      1. Alphie and Betsy
      2. -
      3. Alphie and Gamal
      4. -
      5. Alphie and Delia
      6. -
      7. Alphie and Eva
      8. -
      9. Alphie and Frank
      10. -
      11. Betsy and Gamal
      12. -
      13. Betsy and Delia
      14. -
      15. Betsy and Eva
      16. -
      17. Betsy and Frank
      18. -
      19. Gamal and Delia
      20. -
      21. Gamal and Eva
      22. -
      23. Gamal and Frank
      24. +
      25. Morgan and Jasmine
      26. +
      27. Morgan and Omar
      28. +
      29. Morgan and Delia
      30. +
      31. Morgan and Eva
      32. +
      33. Morgan and Frank
      34. +
      35. Jasmine and Omar
      36. +
      37. Jasmine and Delia
      38. +
      39. Jasmine and Eva
      40. +
      41. Jasmine and Frank
      42. +
      43. Omar and Delia
      44. +
      45. Omar and Eva
      46. +
      47. Omar and Frank
      48. Delia and Eva
      49. Delia and Frank
      50. Eva and Frank
      51. diff --git a/cur/programming/CSTA2020/quiz-app.html b/cur/programming/CSTA2020/quiz-app.html index e4d93d8618..2c9e399866 100644 --- a/cur/programming/CSTA2020/quiz-app.html +++ b/cur/programming/CSTA2020/quiz-app.html @@ -112,9 +112,9 @@

        Checking Each Quiz Answer

        The students are considering how to use their abstract data type as they develop the code for their project.
        -
        Alphie: We can use our question from quiz item: () and answer from quiz item: () selectors to get the question and answer for quiz item in our list. But how do we get the quiz item out of the list in the first place?
        +
        Morgan: We can use our question from quiz item: () and answer from quiz item: () selectors to get the question and answer for quiz item in our list. But how do we get the quiz item out of the list in the first place?
        - Gamal: Maybe we can use item of inside a for loop and use the index from the for loop as the first input to item of, like this:
        + Omar: Maybe we can use item of inside a for loop and use the index from the for loop as the first input to item of, like this:
        for (i) = (1) to (4) {
     ask (question from (item (i) of (computer science quiz))) and wait
 }
        - Betsy: Yeah, we could, but that's a little hard to read with that index variable, i, to keep track of. And if we add more questions, we'll have to update that number 4 that tells us when to end the loop. I bet we can use for each to traverse the list. + Jasmine: Yeah, we could, but that's a little hard to read with that index variable, i, to keep track of. And if we add more questions, we'll have to update that number 4 that tells us when to end the loop. I bet we can use for each to traverse the list.
        - Betsy drags for each into the scripting area.
        + Jasmine drags for each into the scripting area.
        for each (item) of 'list input slot' {}
        - Gamal: We could even rename item something logical like quiz item. Then the code inside will run once for each quiz item in our list. + Omar: We could even rename item something logical like quiz item. Then the code inside will run once for each quiz item in our list.
    diff --git a/cur/programming/CSTANE2020/quiz-app.html b/cur/programming/CSTANE2020/quiz-app.html index cf995ef106..b81abcb16e 100644 --- a/cur/programming/CSTANE2020/quiz-app.html +++ b/cur/programming/CSTANE2020/quiz-app.html @@ -109,9 +109,9 @@

    Checking Each Quiz Answer

    The students are considering how to use their abstract data type as they develop the code for their project.
    -
    Alphie: We can use our question from quiz item: () and answer from quiz item: () selectors to get the question and answer for quiz item in our list. But how do we get the quiz item out of the list in the first place?
    +
    Morgan: We can use our question from quiz item: () and answer from quiz item: () selectors to get the question and answer for quiz item in our list. But how do we get the quiz item out of the list in the first place?
    - Gamal: Maybe we can use item of inside a for loop and use the index from the for loop as the first input to item of, like this:
    + Omar: Maybe we can use item of inside a for loop and use the index from the for loop as the first input to item of, like this:
    for (i) = (1) to (4) {
     ask (question from (item (i) of (computer science quiz))) and wait
 }
    - Betsy: Yeah, we could, but that's a little hard to read with that index variable, i, to keep track of. And if we add more questions, we'll have to update that number 4 that tells us when to end the loop. I bet we can use for each to traverse the list. + Jasmine: Yeah, we could, but that's a little hard to read with that index variable, i, to keep track of. And if we add more questions, we'll have to update that number 4 that tells us when to end the loop. I bet we can use for each to traverse the list.
    - Betsy drags for each into the scripting area.
    + Jasmine drags for each into the scripting area.
    for each (item) of 'list input slot' {}
    - Gamal: We could even rename item something logical like quiz item. Then the code inside will run once for each quiz item in our list. + Omar: We could even rename item something logical like quiz item. Then the code inside will run once for each quiz item in our list.
    diff --git a/cur/programming/new-ideas/graphics/colors-sound.html b/cur/programming/new-ideas/graphics/colors-sound.html index 52ec3e72c4..4c6d392175 100644 --- a/cur/programming/new-ideas/graphics/colors-sound.html +++ b/cur/programming/new-ideas/graphics/colors-sound.html @@ -38,12 +38,12 @@

    Looks and Sound

    Wait, what? Usually in a dialog we have some idea what problem they're trying to solve. Also, this isn't a Getting Started page, so is it fair to introduce all this stuff they haven't seen yet? All this about lists and hofs kind of loses the point about music.
    -
    Alphie Ok well, here's a list of the notes: . If we click it, it lists the notes.
    +
    Morgan Ok well, here's a list of the notes: . If we click it, it lists the notes.
    Betty: Let's play that list of notes for 0.5 beats each: Oh, that only played one note!
    -
    Alphie: We could try to "run" your script...
    +
    Morgan: We could try to "run" your script...
    Gammie: Let's try this map over thing and leave the note blank for the list to fill in: I got an error!
    Ok, maybe map over input? Hmm...
    -
    Alphie: How about this? Another error!
    +
    Morgan: How about this? Another error!
    Betty: Hey, we want to repeat the same commands for different items in a list, so what if we tried a for each loop?
    diff --git a/cur/teaching-guide/U1/overview.html b/cur/teaching-guide/U1/overview.html index 3c8f30981b..319e0aff80 100644 --- a/cur/teaching-guide/U1/overview.html +++ b/cur/teaching-guide/U1/overview.html @@ -237,10 +237,10 @@

    Design Elements

    -
    Alphie: These are scripts for short skits that model some aspect of computational thinking.
    -
    Betsy: You can have students read them out loud, if most of the class is in the same place in the lab at the same time.
    +
    Morgan: These are scripts for short skits that model some aspect of computational thinking.
    +
    Jasmine: You can have students read them out loud, if most of the class is in the same place in the lab at the same time.
    Students should act out the italic stage directions instead of reading them out loud. (Or an audience member can narrate as they act it out.)
    -
    Gamal: Mix it up! Students can read these dialogues in small groups or in front of the class (maybe even have two groups read in turn to increase retention), or teachers can assign them as a homework assignment and have students record a video or podcast of their reading.
    +
    Omar: Mix it up! Students can read these dialogues in small groups or in front of the class (maybe even have two groups read in turn to increase retention), or teachers can assign them as a homework assignment and have students record a video or podcast of their reading.
    Encourage participation, of course, but also be sensitive to students who, for one reason or another, are too anxious at first to present in front of others.
    diff --git a/cur/teaching-guide/U2/lab-pages/old/old-2-data-art.html b/cur/teaching-guide/U2/lab-pages/old/old-2-data-art.html index 13a1b73762..57d5882b2c 100644 --- a/cur/teaching-guide/U2/lab-pages/old/old-2-data-art.html +++ b/cur/teaching-guide/U2/lab-pages/old/old-2-data-art.html @@ -187,7 +187,7 @@

    Old Stuff Below; probably much is salvageable

  • Tips:
      -
    • The dialog has some complicated ideas. Arrange so that students can read it through more than once (perhaps, individually, in small groups, as a "dramatic reading"....) For out loud reading, students are often more comfortable if they've had a chance to prepare first, so you might invite three students, as they enter class, to prepare to be Alphie, Betsy, or Gamal for today.
    • +
    • The dialog has some complicated ideas. Arrange so that students can read it through more than once (perhaps, individually, in small groups, as a "dramatic reading"....) For out loud reading, students are often more comfortable if they've had a chance to prepare first, so you might invite three students, as they enter class, to prepare to be Morgan, Jasmine, or Omar for today.
    • go to point(point){glide(0.5) secs to x:( ) y:( )}
    • Debugging: Have students first think about what goes in the two blanks inside the go to point script. Only after the letter is mostly being drawn correctly should they tackle the two bugs, one at the beginning and one at the end of the drawing process.
    • diff --git a/cur/teaching-guide/U3/old/1-introduction-to-lists.html b/cur/teaching-guide/U3/old/1-introduction-to-lists.html index 5bec7c9eb8..53cc29d654 100644 --- a/cur/teaching-guide/U3/old/1-introduction-to-lists.html +++ b/cur/teaching-guide/U3/old/1-introduction-to-lists.html @@ -191,7 +191,7 @@

      Assignments:

        JK: Putting in these bullets to remind myself, in response to AC's comment that it's good to ask students to fix scripts because it demonstrates MP "something or other"
        -
      • Fixing Alphie and Betty's script...
      • +
      • Fixing Morgan and Betty's script...
      • Also include sample student responses for what partners are saying to each other about how sentence builder demonstrates abstraction
      --> diff --git a/cur/teaching-guide/U3/old/2-nesting-lists.html b/cur/teaching-guide/U3/old/2-nesting-lists.html index 9daf38e21e..e5f7477e85 100644 --- a/cur/teaching-guide/U3/old/2-nesting-lists.html +++ b/cur/teaching-guide/U3/old/2-nesting-lists.html @@ -162,7 +162,7 @@

      Assignments:

      • 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}' + student record with name: (Morgan) grade: (87) reporting '{Morgan, 87}'
      • Create two selectors name and grade that, given a student record as input, report the name or grade for that student record.
        @@ -223,7 +223,7 @@

        Tips:

      • For the Take It Further problem, students may want/be asked to review the concept of slope from algebra to identify the remaining points in the letter.
      • JK: ...in response to AC's comment that it's good to ask students to fix scripts because it demonstrates MP "something or other"
        • Has this comment been addressed? --MF
        -
      • Debugging: As students fix the bugs in Alphie and Betty's script, they must seek the cause(s) of the unwanted and missing lines in the drawing and identify the appropriate solution.
      • +
      • Debugging: As students fix the bugs in Morgan and Betty's script, they must seek the cause(s) of the unwanted and missing lines in the drawing and identify the appropriate solution.
      • Mathematics Note: Coordinates Again. The list A contains the coordinates of the special points (vertices) that define the picture of the letter A in that position on the stage. You can use these coordinates to draw an exact replica of A in another spot on the stage. This would be useful, for example, if you want to set two letters next to each other on the screen, or make a "shadow" of A or to draw an offset image to create a three-dimensional effect. Try creating a list AA from A by adding, say, 50 to each of the coordinates of each of the points, and then plot the resulting points with for each. Later in this unit, you'll see how to produce AA with a lot less trouble, using map.
      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 ab17978673..83f7d74562 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 @@ -44,7 +44,7 @@

      Lab Pages

    • Tips:
        -
      • Paradox isn't the important thing for students to learn on this page. (The unsolvable problem presented on the second page isn't paradoxical.) Rather, it's proof by contradiction that's important. Gamal explains this technique in the first dialog.
      • +
      • Paradox isn't the important thing for students to learn on this page. (The unsolvable problem presented on the second page isn't paradoxical.) Rather, it's proof by contradiction that's important. Omar explains this technique in the first dialog.
      • The student page uses the slightly awkward "false-teller" to avoid digressions into the psychology of liars, though you may enjoy Martin Gardner's discussion of the "which way to the village" problem in Hexaflexagons and other mathematical diversions: the first Scientific American book of puzzles & games. It ends with the delightful suggested question, "Did you know that they're giving away free beer in the village?" You ignore their answer and follow the native.
    • diff --git a/cur/teaching-guide/U5/lab-pages/old/3-timing-experiments.html b/cur/teaching-guide/U5/lab-pages/old/3-timing-experiments.html index 17e1127e45..84f90b3932 100644 --- a/cur/teaching-guide/U5/lab-pages/old/3-timing-experiments.html +++ b/cur/teaching-guide/U5/lab-pages/old/3-timing-experiments.html @@ -56,8 +56,8 @@

      Lab Pages

    • Discussion: Why create more than one algorithm to solve the same problem?
        -
      • Which of Alphie and Betsy's algorithms solves the problem faster?
      • -
      • Which of Alphie and Betsy's algorithms is easier to understand?
      • +
      • Which of Morgan and Jasmine's algorithms solves the problem faster?
      • +
      • Which of Morgan and Jasmine's algorithms is easier to understand?
      • What trade-offs are there in programming an algorithm for speed or simplicity?
    • @@ -65,7 +65,7 @@

      Lab Pages

      Tips: