From fce9b86d9326e22ae982163d6368197b5cd65823 Mon Sep 17 00:00:00 2001
From: jkangEDC
Date: Tue, 10 Dec 2024 18:58:28 -0500
Subject: [PATCH] A11y-U8 fix lists - done U8
---
.../1-counting-trees.es.html | 6 +++---
.../1-counting-trees.html | 7 +++++--
.../2-writing-recursive-reporters.es.html | 5 +++--
.../2-writing-recursive-reporters.html | 9 +++++----
.../3-subsets/2-subsets.html | 7 ++++---
.../2-generalizing-the-map-pattern.html | 10 +++++-----
.../3-even-number-filter.es.html | 7 ++++---
.../3-even-number-filter.html | 6 +++---
.../2-pascal-efficiency.es.html | 11 ++++++-----
.../2-pascal-efficiency.html | 14 +++++++-------
.../1-sorting-a-list.es.html | 19 ++++++++++---------
.../1-sorting-a-list.html | 15 ++++++++-------
.../2-selection-sort.html | 4 ++--
.../3-partition-sort.html | 13 +++++++------
14 files changed, 72 insertions(+), 61 deletions(-)
diff --git a/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.es.html b/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.es.html
index e37eea4ac9..fd002c952d 100644
--- a/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.es.html
+++ b/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.es.html
@@ -18,7 +18,7 @@ Contar árboles
-
- Abre tu proyecto "U7L1-Árbol". ¿Cuántos segmentos de línea hay en un árbol de cada nivel? Completa esta tabla. (Puedes contar a simple vista o usar Snap! para contar).
+ Abre tu proyecto "U7L1-Árbol". ¿Cuántos segmentos de línea hay en un árbol de cada nivel? Completa esta tabla. (Puedes contar a simple vista o usar Snap! para contar).
nivel |
@@ -54,8 +54,8 @@ Contar árboles
- ¿Cómo se compara la cantidad de segmentos en un nivel con la cantidad de segmentos en el nivel anterior?
- Construya un bloque que tenga un número de árbol como entrada y la cantidad de segmentos en ese nivel como salida
-
-
+
+
diff --git a/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.html b/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.html
index 2d66f758d5..408c738732 100644
--- a/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.html
+++ b/cur/programming/8-recursive-reporters/1-recursive-reporters/1-counting-trees.html
@@ -56,8 +56,9 @@ Counting Trees
- How does the number of segments in one level compare to the number of segments in the previous level?
- - Build a block whose input is a tree number and whose output is the number of segments in that level:
-
+ - Build a block whose input is a tree number and whose output is the number of segments in that level:
+
+
@@ -115,6 +116,8 @@ Counting Trees
"U8L1-Recursive-Reporters"
+
+
Do we need this commented out content? --MF, 6/22/20
diff --git a/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.es.html b/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.es.html
index 213cc1d34c..a075b0196e 100644
--- a/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.es.html
+++ b/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.es.html
@@ -18,8 +18,9 @@ Escribir reporteros recursivos
La función factorial n! se define como el producto de los números enteros de 1 a n.
- - El valor de 9! es 362.880. Encuentra el valor de 10!.
- No olvides el consejo de Betty: ¡Los casos base son importantes!
+ - El valor de 9! es 362.880. Encuentra el valor de 10!.
+
No olvides el consejo de Betty: ¡Los casos base son importantes!
+
- Describe la relación entre 37! y 36!.
- Usa estas ideas para construir un
factorial
bloque usando un reportero recursivo.
diff --git a/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.html b/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.html
index d4218d89af..cf2c272dc1 100644
--- a/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.html
+++ b/cur/programming/8-recursive-reporters/1-recursive-reporters/2-writing-recursive-reporters.html
@@ -38,8 +38,9 @@ Writing Recursive Reporters
The factorial function, n!, is defined to be the product of the integers from 1 to n.
- - The value of 9! is 362,880. Find the value of 10!.
- Don't forget Betty's advice: base cases are important!
+ - The value of 9! is 362,880. Find the value of 10!.
+
Don't forget Betty's advice: base cases are important!
+
- Describe the relationship between 37! and 36!.
- Use these ideas to build a
factorial
block using a recursive reporter.
@@ -68,8 +69,8 @@ Writing Recursive Reporters
Word processing programs count the number of words and letters in documents. One way to count the number of letters in a phrase is to use a recursive reporter.
+
-
- The phrase "in the course of human events" has 24 letters. How many letters are there in the phrase "When in the course of human events"?
- Recursion always needs a base case to stop the script from calling itself forever. What sort of base case might we use for this situation?
-
@@ -82,6 +83,7 @@
Writing Recursive Reporters
Create your own version of the join words
block. This block inputs a list and outputs a string sentence, with spaces:
+
Again, I am concerned with teaching recursion as "a more complicated way to do what you already know how to do." I don't think my join words
works because it can be done so much more quickly non-recursively by using combine
. I do like letter count
though because it does simplify the code. --MF
@@ -90,7 +92,6 @@
Writing Recursive Reporters
I need a suggestion to change this. Or is the suggestion to delete the join-words task? Any other things to replace it? Also we should use "empty?" when possible, not "length = 0". -BK
-
The list operations all but first of
and in front of
are frequently used in recursive reporters.
diff --git a/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html b/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html
index c0b85dc3d7..1449030fec 100644
--- a/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html
+++ b/cur/programming/8-recursive-reporters/3-subsets/2-subsets.html
@@ -20,9 +20,10 @@ Listing the Subsets
- Write down all the subsets of {Apple, Orange, Banana}. How many are there?
- - Write down all the subsets of {Pretzel, Apple, Orange, Banana}. Try to do this with as little work as possible.
- Add a question that gets at how 2 is just an augmentation of 1. --MF, 6/17/20
-
Describe how you did it.
+ - Write down all the subsets of {Pretzel, Apple, Orange, Banana}. Try to do this with as little work as possible.
+
Add a question that gets at how 2 is just an augmentation of 1. --MF, 6/17/20
+
Describe how you did it.
+
-
MARY Note to self: this is hard. for example, in base case (subsets of empty list), you have to report a list containing the empty list. Add a question that gets at the base case.
diff --git a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/2-generalizing-the-map-pattern.html b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/2-generalizing-the-map-pattern.html
index f324026645..e8e34fe1a5 100755
--- a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/2-generalizing-the-map-pattern.html
+++ b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/2-generalizing-the-map-pattern.html
@@ -69,12 +69,12 @@ Generalizing the Map
Pattern
Occasionally a problem comes up that doesn't exactly match the map
pattern, but comes close. In that case, you can't use map
, but your understanding of the pattern still helps. Here's an example:
Fill in the blanks: This script is just like the map pattern except for ______ (base case) and _____ (in the recursive case).
+
+
Shouldn't pairup
come before odd numbered
? --MF, 9/26/18
+
BH:that's ok, but take ALL the text from #2 and move it here with this. --MF, 6/17/20
+
The fill in the blank is not something we’ve seen before in the curriculum. Seems out of place. --Michelle via MF, 4/22/22
- I don't really agree, but I'm open to discuss. --MF, 4/22/22
+
-
-
Shouldn't pairup
come before odd numbered
? --MF, 9/26/18
-
BH:that's ok, but take ALL the text from #2 and move it here with this. --MF, 6/17/20
-
The fill in the blank is not something we’ve seen before in the curriculum. Seems out of place. --Michelle via MF, 4/22/22
- I don't really agree, but I'm open to discuss. --MF, 4/22/22
-
-
Build the
pairup
block:
diff --git a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.es.html b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.es.html
index 2588aad874..0ad82b4dc6 100644
--- a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.es.html
+++ b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.es.html
@@ -24,8 +24,8 @@ Números pares y mantener
Haz los siguientes ejercicios usando recursividad, no funciones de orden superior.
- Intenta modificar el código de evens
.
- -
+
-
+
Intenta modificar el código de evens
.
Escriba un bloque termina en-a
que tome una lista de palabras como entrada y reporte una lista de esas palabras de la entrada cuya última letra es a.
Números pares y mantener
- Crear
mapear
,
mantener
y
combinar
es un gran logro. Sin embargo, cada uno de estos bloques solo generaliza un patrón simple. Algunas personas piensan ni siquiera aprender a
usar las funciones de orden superior son en la universidad, ni mucho menos a construirlasn. 🎉 ¡Enhorabuena! 👏 ¡Completaste
La belleza y alegría de la Informática (BJC)! 🏆
+
+
Crear mapear
, mantener
y combinar
es un gran logro. Sin embargo, cada uno de estos bloques solo generaliza un patrón simple. Algunas personas piensan ni siquiera aprender a usar las funciones de orden superior son en la universidad, ni mucho menos a construirlasn. 🎉 ¡Enhorabuena! 👏 ¡Completaste La belleza y alegría de la Informática (BJC)! 🏆
diff --git a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.html b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.html
index bc4689a748..173b2e7a22 100755
--- a/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.html
+++ b/cur/programming/8-recursive-reporters/4-building-higher-order-functions/3-even-number-filter.html
@@ -33,10 +33,10 @@
Even Numbers and Keep
Fundamental Concern: The pedagogy here is killing me. Here draw a square with recursion or functionally. WHY?!?!? Don't torture students. Give them a problem where this technique really matters. --MF, 9/26/18
Do the following exercises using recursion, not higher order functions.
- Try modifying the code from evens
.
-
- Write a block
ends-e
that takes a list of words as input, and reports a list of those words from the input whose last letter is e.
-
+ Try modifying the code from evens
.
+ Write a block ends-e
that takes a list of words as input, and reports a list of those words from the input whose last letter is e.
+
-
Write a block
numbers
that takes a list of mixed words and numbers as input, and reports a list of just the numbers from the input list.
diff --git a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.es.html b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.es.html
index fa457e588d..50103682ce 100644
--- a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.es.html
+++ b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.es.html
@@ -17,8 +17,8 @@ El triángulo de Pascal y la eficiencia
Estás a punto de averiguar cuántas llamadas recursivas se necesitan para calcular un valor en el triángulo de Pascal.
+
¿Qué podrías insertar dentro del bloque para rastrear esto?
- ¿Qué podrías insertar dentro del bloque para rastrear esto?
- Modifica tu bloque
pascal
para llevar la cuenta de cuántas veces se ejecuta el bloque.
- ¿Cuántas veces se llama al bloque
pascal
al calcular ?
- ¿Qué ocurre cuando llamas a ?
@@ -29,12 +29,13 @@ El triángulo de Pascal y la eficiencia
Muchas de las llamadas recursivas son redundantes. Por ejemplo: llamará a muchas veces, pidiendo la misma información.
+
Esta técnica se llama memoización. Esto no es un error tipográfico; no hay "r" en la palabra. Cada respuesta grabada es como un "memorándum".
- Esta técnica se llama memoización. Esto no es un error tipográfico; no hay "r" en la palabra. Cada respuesta grabada es como un "memorándum".
- Usa una estructura de lista para realizar un seguimiento de los valores ya calculados de
pascal
, de modo que, cuando se vuelvan a proporcionar las mismas entradas, la función busque el valor guardado en lugar de realizar más llamadas recursivas.
- - Hay una fórmula directa para
pascal
que se usa mucho:
- \text{pascal}(n,r) = \frac{n!}{r!(n-r)!}
- Crea una versión de pascal
que use la fórmula. Compara la eficiencia de esta versión con la versión recursiva y determina si cada versión se ejecuta en tiempo constante, tiempo lineal, tiempo cuadrático o tiempo exponencial.
+ - Hay una fórmula directa para
pascal
que se usa mucho:
+ \text{pascal}(n,r) = \frac{n!}{r!(n-r)!}
+ Crea una versión de pascal
que use la fórmula. Compara la eficiencia de esta versión con la versión recursiva y determina si cada versión se ejecuta en tiempo constante, tiempo lineal, tiempo cuadrático o tiempo exponencial.
+
diff --git a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.html b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.html
index 953210b4a7..0c7ebfe5d4 100755
--- a/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.html
+++ b/cur/programming/8-recursive-reporters/optional-project-pascals-triangle/2-pascal-efficiency.html
@@ -26,8 +26,8 @@ Pascal's Triangle and Efficiency
You are about to figure out how many recursive calls are needed to compute a value in Pascal's Triangle.
+
What could you insert inside the block to track this?
- What could you insert inside the block to track this?
- Modify your
pascal
block to keep count of how many times the block is executed.
- How many times is the
pascal
block called when calculating ?
- What happens when you call ?
@@ -58,14 +58,14 @@ Pascal's Triangle and Efficiency
pascal(7,2) + pascal(7,3) + pascal(7,3) + pascal(7,4) + pascal(7,3) + pascal(7,4) + pascal(7,4) + pascal(7,5)
-->
+
This technique is called memoization. This is not a typo; there's no "r" in the word. Each recorded answer is like a "memo".
- This technique is called memoization. This is not a typo; there's no "r" in the word. Each recorded answer is like a "memo".
- Use a list structure to keep track of already-computed values of
pascal
, so that when the same inputs are given again, the function looks up the saved value instead of making more recursive calls.
- - There is a direct formula for
pascal
that is often used:
- \text{pascal}(n,r) = \frac{n!}{r!(n-r)!}
-
- Build a version of pascal
that uses the formula. Compare the efficiency of this version to the recursive version, and determine whether each version runs in constant time, linear time, quadratic time, or exponential time.
-
+ - There is a direct formula for
pascal
that is often used:
+ \text{pascal}(n,r) = \frac{n!}{r!(n-r)!}
+
+ Build a version of pascal
that uses the formula. Compare the efficiency of this version to the recursive version, and determine whether each version runs in constant time, linear time, quadratic time, or exponential time.
+
diff --git a/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.es.html b/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.es.html
index 2a3d881710..9504ab354d 100644
--- a/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.es.html
+++ b/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.es.html
@@ -17,8 +17,8 @@ Ordenar una lista
+
Intenta describir el algoritmo con suficiente detalle para que otra persona pueda usar tu descripción para ordenar una lista.
- Intenta describir el algoritmo con suficiente detalle para que otra persona pueda usar tu descripción para ordenar una lista.
-
Diseña un algoritmo recursivo para ordenar los nombres.
@@ -26,14 +26,15 @@ Ordenar una lista
- Luego considera cómo le dirías a una computadora, que no es tan inteligente como tú y solo puede realizar procedimientos específicos, cómo ordenar una lista.
- - Ahora construye tu algoritmo: una
ordenación reportera
toma una lista como entrada y genera una nueva lista de los mismos elementos en orden alfabético. Prueba tu algoritmo usando nombres y números.
-
- La comparación de números y cadenas se puede hacer usando los mismos bloques, por lo que tu algoritmo de clasificación debería funcionar igualmente bien para nombres y números.
-
-
-
-
+ - Ahora construye tu algoritmo: una
ordenación reportera
toma una lista como entrada y genera una nueva lista de los mismos elementos en orden alfabético. Prueba tu algoritmo usando nombres y números.
+
+ La comparación de números y cadenas se puede hacer usando los mismos bloques, por lo que tu algoritmo de clasificación debería funcionar igualmente bien para nombres y números.
+
+
+
+
+
- Comparte tus algoritmos de clasificación. Describe algunas similaraciones y diferencias entre los diferentes algoritmos de clasificación.
diff --git a/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.html b/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.html
index 0db1897c7e..fef75a6370 100755
--- a/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.html
+++ b/cur/programming/8-recursive-reporters/optional-project-sorting/1-sorting-a-list.html
@@ -31,8 +31,8 @@ Sorting a List
Kill the sentence about numbers and words; numbers don't sort numerically if you do a lexicographic sort, so mixing the two is tricky. --bh
+
Try to describe the algorithm in enough detail so that someone else could use your description to sort a list.
- Try to describe the algorithm in enough detail so that someone else could use your description to sort a list.
-
Design a recursive algorithm for sorting the names.
@@ -40,12 +40,13 @@ Sorting a List
- Then consider how you would tell a computer, which is not as smart as you and can only perform specific procedures, how to sort a list.
- - Now build your algorithm: a
sort
reporter takes a list as input and outputs a new list of the same elements in alphabetical order. Test your algorithm using both names and numbers.
-
- Comparing numbers and strings can be done using the same blocks, so your sorting algorithm should work equally well for names and numbers.
-
-
-
+ - Now build your algorithm: a
sort
reporter takes a list as input and outputs a new list of the same elements in alphabetical order. Test your algorithm using both names and numbers.
+
+ Comparing numbers and strings can be done using the same blocks, so your sorting algorithm should work equally well for names and numbers.
+
+
+
+
- Share your sorting algorithms. Describe some similarities and differences between different sorting algorithms.
diff --git a/cur/programming/8-recursive-reporters/optional-project-sorting/2-selection-sort.html b/cur/programming/8-recursive-reporters/optional-project-sorting/2-selection-sort.html
index 9e8bc41f17..83b4b34ec1 100644
--- a/cur/programming/8-recursive-reporters/optional-project-sorting/2-selection-sort.html
+++ b/cur/programming/8-recursive-reporters/optional-project-sorting/2-selection-sort.html
@@ -46,8 +46,8 @@ Selection Sort
Write the earliest in
block. For names, this returns the first name alphabetically in a list:
+
-
- Write code that finds the index of the earliest item. This value is 8 for the list of names above. (You may not need this step, depending on your algorithm. See if you can do the next step without it.)
-
@@ -72,8 +72,8 @@
Selection Sort
- ST-4/13/18: Tim Matthies at
Piazza noticed that we need to give directions for how to import this data. It turns out that capturing the data from the link given, importing and cleaning it is completely non-trivial and I don't think we have done this before in the curriculum. I recommend we make the following (huge)
starter file available where the names are isolated and listed in popularity order, devoid of gender and number fields.
+
ST-4/13/18: Tim Matthies at
Piazza noticed that we need to give directions for how to import this data. It turns out that capturing the data from the link given, importing and cleaning it is completely non-trivial and I don't think we have done this before in the curriculum. I recommend we make the following (huge)
starter file available where the names are isolated and listed in popularity order, devoid of gender and number fields.