Skip to content

Commit c98e4a5

Browse files
committed
fix duplicate ids
1 parent 7b22a0e commit c98e4a5

File tree

7 files changed

+38
-37
lines changed

7 files changed

+38
-37
lines changed

_sources/quiz/Quiz10_en.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Quiz - 10
1111

1212
.. tab:: Exercise 1
1313

14-
.. activecode:: q10_1
14+
.. activecode:: q10_1_en
1515
:nocodelens:
1616

1717
Develop the function ``cuantas_donas`` that takes ``n``, a positive integer, as a parameter,
@@ -52,7 +52,7 @@ Quiz - 10
5252

5353
.. tab:: Exercise 2
5454

55-
.. activecode:: q10_2
55+
.. activecode:: q10_2_en
5656
:nocodelens:
5757

5858
Develop the function ``cadena_de_extremos`` that, given a string ``s``,
@@ -86,7 +86,7 @@ Quiz - 10
8686

8787
.. tab:: Exercise 3
8888

89-
.. activecode:: q10_3
89+
.. activecode:: q10_3_en
9090
:nocodelens:
9191

9292
Develop the function ``remplazar_primer_caracter`` that, given a string ``s``,
@@ -120,7 +120,7 @@ Quiz - 10
120120

121121
.. tab:: Exercise 4
122122

123-
.. activecode:: q10_4
123+
.. activecode:: q10_4_en
124124
:nocodelens:
125125

126126
Develop the function ``combinar_dos_cadenas`` that takes two strings as
@@ -163,7 +163,7 @@ Quiz - 10
163163
.. tab:: Exercise 5
164164

165165

166-
.. activecode:: q10_5
166+
.. activecode:: q10_5_en
167167
:nocodelens:
168168

169169
Develop the function ``es_palindromo`` that takes a string ``s`` as
@@ -197,7 +197,7 @@ Quiz - 10
197197

198198
.. tab:: Exercise 6
199199

200-
.. activecode:: q10_6
200+
.. activecode:: q10_6_en
201201
:nocodelens:
202202

203203
Develop the function ``contar_ocurrencias`` that takes two parameters:

_sources/quiz/Quiz11_en.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Quiz - 11
1010

1111
.. tab:: Exercise 1
1212

13-
.. activecode:: q11_1
13+
.. activecode:: q11_1_en
1414
:nocodelens:
1515

1616
Develop the function ``verbo`` that receives a string ``s`` as a parameter. If the length of the string is at least 3, it should return the original string concatenated with ``"ing"`` at the end. If the string ``s`` already ends with ``"ing"``, concatenate the string ``"ly"``. If the length of the string is less than 3, it returns the original string. |br| |br|
@@ -45,7 +45,7 @@ Quiz - 11
4545

4646
.. tab:: Exercise 2
4747

48-
.. activecode:: q11_2
48+
.. activecode:: q11_2_en
4949
:nocodelens:
5050

5151
Develop the function ``no_es_malo`` that receives a string ``s`` as a parameter. The function must search for the first occurrence of the string ``"no es"`` and the last occurrence of the string ``"malo"`` or the string ``"mala"``, if either appears after the first one, replace ``"no es" ... "malo"`` or ``"no es" ... "mala"`` with the strings ``"es bueno"`` or ``"es buena"`` respectively, then return the result. |br| |br|
@@ -105,7 +105,7 @@ Quiz - 11
105105

106106
.. tab:: Exercise 3
107107

108-
.. activecode:: q11_3
108+
.. activecode:: q11_3_en
109109
:nocodelens:
110110

111111
Develop the function ``inicio_final`` that receives two strings ``a`` and ``b``. The strings have to be divided into two, if either of the strings has an odd number of characters, the first half will be the longest substring (for example ``dog`` will be divided into: ``do`` and ``g``). Given the two strings, return a new string formed as follows ``a_start + b_start + a_end + b_end``. |br| |br|
@@ -146,7 +146,7 @@ Quiz - 11
146146

147147
.. tab:: Exercise 4
148148

149-
.. activecode:: q11_4
149+
.. activecode:: q11_4_en
150150
:nocodelens:
151151

152152
Develop the function ``cuantos_ceros`` that given a positive integer ``n``, returns the number of zeros at the end of the integer. |br| |br|
@@ -183,7 +183,7 @@ Quiz - 11
183183

184184
.. tab:: Exercise 5
185185

186-
.. activecode:: q11_5
186+
.. activecode:: q11_5_en
187187
:nocodelens:
188188

189189
Develop the function ``contar_2`` that receives a positive integer ``n`` greater than 0. The function must return the number of times the digit 2 appears in the interval``[0, n-1]``. |br| |br|
@@ -216,7 +216,7 @@ Quiz - 11
216216

217217
.. tab:: Exercise 6
218218

219-
.. activecode:: q11_6
219+
.. activecode:: q11_6_en
220220
:nocodelens:
221221

222222
Develop the function ``inicio_potencia`` that receives a positive integer ``n`` greater than 0. The function must return the first power of 2 that starts with ``n``. |br| |br|

_sources/quiz/Quiz12_en.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Quiz - 12
1111

1212
.. tab:: Exercise 1
1313

14-
.. activecode:: q12_1
14+
.. activecode:: q12_1_en
1515
:nocodelens:
1616

1717
Develop the function ``ends_equal`` that, given a list of strings ``words``, returns the number of strings
@@ -40,7 +40,7 @@ Quiz - 12
4040

4141
.. tab:: Exercise 2
4242

43-
.. activecode:: q12_2
43+
.. activecode:: q12_2_en
4444
:nocodelens:
4545

4646
Develop the function ``x_before`` that, given a list of strings ``words``, returns
@@ -84,7 +84,7 @@ Quiz - 12
8484

8585
.. tab:: Exercise 3
8686

87-
.. activecode:: q12_3
87+
.. activecode:: q12_3_en
8888
:nocodelens:
8989

9090
Develop the function ``sort_tuples`` that, given a non-empty list of tuples, returns another list

_sources/quiz/Quiz13_en.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Quiz - 13
1111

1212
.. tab:: Exercise 1
1313

14-
.. activecode:: q13_1
14+
.. activecode:: q13_1_en
1515
:nocodelens:
1616

1717
Develop the function ``remove_duplicates`` that receives a list ``numbers`` of integers. The function should return a list without repeated elements and sorted in ascending order. |br| |br|
@@ -46,7 +46,7 @@ Quiz - 13
4646

4747
.. tab:: Exercise 2
4848

49-
.. activecode:: q13_2
49+
.. activecode:: q13_2_en
5050
:nocodelens:
5151

5252
Develop the function ``encrypt`` that receives a string ``phrase``. The function should return a new encrypted string, following these rules: |br|

_sources/quiz/Quiz8_en.rst

+13-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Quiz - 8
1111

1212
.. tab:: Exercise 1
1313

14-
.. activecode:: q8_1
14+
.. activecode:: q8_1_en
1515
:nocodelens:
1616

1717
Define a function ``first_or_last_6`` that checks whether 6 is the first
@@ -46,7 +46,7 @@ Quiz - 8
4646

4747
.. tab:: Exercise 2
4848

49-
.. activecode:: q8_2
49+
.. activecode:: q8_2_en
5050
:nocodelens:
5151

5252
Define a function ``same_ends`` that takes a list ``numbers`` as a parameter,
@@ -84,7 +84,7 @@ Quiz - 8
8484

8585
.. tab:: Exercise 3
8686

87-
.. activecode:: q8_3
87+
.. activecode:: q8_3_en
8888
:nocodelens:
8989

9090
Define a function ``common_ends`` that takes two lists ``a`` and ``b``
@@ -135,7 +135,7 @@ Quiz - 8
135135

136136
.. tab:: Exercise 4
137137

138-
.. activecode:: q8_4
138+
.. activecode:: q8_4_en
139139
:nocodelens:
140140

141141
Define a function called ``mayor_extremo`` that takes the list "numeros" as parameter, compares the ends of the list and returns a new list of the same size where all elements are the greatest magnitude extreme. |br| |br|
@@ -201,7 +201,7 @@ Quiz - 8
201201

202202
.. tab:: Exercise 5
203203

204-
.. activecode:: q8_5
204+
.. activecode:: q8_5_en
205205
:nocodelens:
206206

207207
Define a function called ``sumar_primeros_dos`` that takes the integer list ``numeros`` of any length as parameter and returns the sum of the first two elements. If the list has less than two elements, add 0s. |br| |br|
@@ -241,7 +241,7 @@ Quiz - 8
241241

242242
.. tab:: Exercise 6
243243

244-
.. activecode:: q8_6
244+
.. activecode:: q8_6_en
245245
:nocodelens:
246246

247247
Define a function called ``al_medio`` that takes two integer lists ``a`` and ``b`` as parameters, and returns a list of size 2 that contains the middle elements of ``a`` and ``b``. Assume that the lists have an odd length. |br| |br|
@@ -297,7 +297,7 @@ Quiz - 8
297297

298298
.. tab:: Exercise 7
299299

300-
.. activecode:: q8_7
300+
.. activecode:: q8_7_en
301301
:nocodelens:
302302

303303
Define a function ``fancy_date``. The function will take two parameters,
@@ -307,11 +307,12 @@ Quiz - 8
307307
Your clothes score will determine if you get a table at the restaurant or not, according to the following rules: |br|
308308

309309
- If the score of one of the two clothing is less than or equal to 2,
310-
they will not be entitled to a table (``0``). |br|
310+
they will not be entitled to a table (``0``). |br|
311311
- If the scores are higher, then if one of them is very
312-
elegant (score >= 8) they will be entitled to a table (``2``). |br|
312+
elegant (score >= 8) they will be entitled to a table (``2``). |br|
313313
- Otherwise, the answer is maybe (``1``). |br|
314314

315+
315316
So ``fancy_date`` returns a number between 0, 1, and 2, which mean No, Maybe, and Yes, respectively. |br| |br|
316317
Examples: |br|
317318
``fancy_date(5, 10)`` -> ``2`` |br|
@@ -347,7 +348,7 @@ Quiz - 8
347348

348349
.. tab:: Exercise 8
349350

350-
.. activecode:: q8_8
351+
.. activecode:: q8_8_en
351352
:nocodelens:
352353

353354
The *squirrels* soccer team normally plays when the temperature is
@@ -392,7 +393,7 @@ Quiz - 8
392393

393394
.. tab:: Exercise 9
394395

395-
.. activecode:: q8_9
396+
.. activecode:: q8_9_en
396397
:nocodelens:
397398

398399
Let's simulate a speedometer that applies a fine if the maximum speed is exceeded:
@@ -450,7 +451,7 @@ Quiz - 8
450451

451452
.. tab:: Exercise 10
452453

453-
.. activecode:: q8_10
454+
.. activecode:: q8_10_en
454455
:nocodelens:
455456

456457
Define a function ``set_alarm`` that takes two parameters: The first parameter

_sources/quiz/QuizExtras2_en.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Quiz - Extras 2
1111

1212
.. tab:: Exercise 1
1313

14-
.. activecode:: qExtra2_1
14+
.. activecode:: qExtra2_1_en
1515
:nocodelens:
1616

1717
A primary school is planning a field trip to the zoo for some of its students. For this, the school can only spend exactly ``budget`` units. It is known that the entry to the zoo costs 5 units for children under 12 years old and 7 units for those who are 12 years old or older. Develop the function ``maximo_estudiantes`` that receives ``budget``, a positive integer that indicates the budget that the school intends to spend. The function should return a tuple ``(p, g)`` with the maximum number of small and large students that the school can take to the zoo considering all values as integers. |br| |br|
@@ -42,7 +42,7 @@ Quiz - Extras 2
4242

4343
.. tab:: Exercise 2
4444

45-
.. activecode:: qExtra2_2
45+
.. activecode:: qExtra2_2_en
4646
:nocodelens:
4747

4848
Develop the function ``a_romano``, which receives a positive integer ``n`` greater than zero. The function should return the conversion of the number from Arabic to Roman numerals. The function should return a string that represents the number in Roman numerals. |br| |br|
@@ -82,7 +82,7 @@ Quiz - Extras 2
8282

8383
.. tab:: Exercise 3
8484

85-
.. activecode:: qExtra2_3
85+
.. activecode:: qExtra2_3_en
8686
:nocodelens:
8787

8888
Develop the function ``calcular_pi``, which receives a positive parameter ``n`` greater than 0. The function should calculate the approximate value of ``pi`` with ``n`` terms, according to the following formula. |br|

_sources/quiz/QuizExtras_en.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Quiz - Extras
1010

1111
.. tab:: Exercise 1
1212

13-
.. activecode:: qExtra_1
13+
.. activecode:: qExtra_1_en
1414
:nocodelens:
1515

1616
**Josephus problem**. Imagine you have ``n`` people arranged in a circle. Suppose these people are numbered from 1 to ``n`` clockwise. Starting with person number **1**,
@@ -36,7 +36,7 @@ Quiz - Extras
3636

3737
.. tab:: Exercise 2
3838

39-
.. activecode:: qExtra_2
39+
.. activecode:: qExtra_2_en
4040
:nocodelens:
4141

4242
Implement the **Sieve of Eratosthenes** algorithm. |br|
@@ -69,7 +69,7 @@ Quiz - Extras
6969

7070
.. tab:: Exercise 3
7171

72-
.. activecode:: qExtra_3
72+
.. activecode:: qExtra_3_en
7373
:nocodelens:
7474

7575
**Project Euler Problem 2**. `Problem <https://projecteuler.net/problem=2>`_ |br|
@@ -109,7 +109,7 @@ Quiz - Extras
109109

110110
.. tab:: Exercise 4
111111

112-
.. activecode:: qExtra_4
112+
.. activecode:: qExtra_4_en
113113
:nocodelens:
114114

115115
In the book "The Man Who Counted," by *Malba Tahan*, a character wanted to win the grains of wheat that were distributed on a chessboard as follows:
@@ -136,7 +136,7 @@ Quiz - Extras
136136

137137
.. tab:: Exercise 5
138138

139-
.. activecode:: qExtra_5
139+
.. activecode:: qExtra_5_en
140140
:nocodelens:
141141

142142
You are given ``n`` tiles with dimensions of 10cm x 10cm. With them, you must assemble a set of squares using all the given tiles. To do this, you must follow the following rules:

0 commit comments

Comments
 (0)