Browse Source

Como en el libro

Luis Albertorio 8 years ago
parent
commit
4f7896d17f
2 changed files with 16 additions and 18 deletions
  1. 8
    6
      README-en.md
  2. 8
    12
      README-es.md

+ 8
- 6
README-en.md View File

1
-
2
 # Arithmetic Expressions - Quadratic Frog
1
 # Arithmetic Expressions - Quadratic Frog
3
 
2
 
4
 ![main1.png](images/main1.png)
3
 ![main1.png](images/main1.png)
52
 
51
 
53
 where $$a, b, c$$ are real numbers and $$a\not=0$$. The graph of a quadratic equation is a *parabola* that opens up if $$a > 0$$ and opens dawn if $$a < 0$$.
52
 where $$a, b, c$$ are real numbers and $$a\not=0$$. The graph of a quadratic equation is a *parabola* that opens up if $$a > 0$$ and opens dawn if $$a < 0$$.
54
 
53
 
55
-A graph intersects the $$x$$-axis when $$y=0$$. Therefore, if a parabola intersects the $$x$$-axis, the intersects are given by the real solutions to the equation
54
+A graph intersects the $$x$$-axis when $$ y = 0 $$ . Therefore, if a parabola intersects the $$x$$-axis, the intersects are given by the real solutions to the equation
56
 
55
 
57
 
56
 
58
 
57
 
64
 
63
 
65
 $$x=\frac{-b±\sqrt{b^2-4ac}}{2a}.$$
64
 $$x=\frac{-b±\sqrt{b^2-4ac}}{2a}.$$
66
 
65
 
67
-Note that if the *discriminant*   $$b^2-4ac$$ of the quadratic formula is negative, the values of $$x$$ are complex numbers and are not plotted in the Cartesian plane. Therefore, if the discriminant is negative, the parabola does not intersect the $$x$$-axis. If the discriminant is equal to $0$, then the parabola intersects the $$x$$-axis in only one point (only the vertex touches the $$x$$-axis).
66
+Note that if the *discriminant*   $$b^2-4ac$$ of the quadratic formula is negative, the values of $$x$$ are complex numbers and are not plotted in the Cartesian plane. Therefore, if the discriminant is negative, the parabola does not intersect the $$x$$-axis. If the discriminant is equal to $$0$$, then the parabola intersects the $$x$$-axis in only one point (only the vertex touches the $$x$$-axis).
68
 
67
 
69
 If the discriminant is positive, the quadratic formula gives two solutions to the equation $$0 = a x^2 + b x + c$$ and these solutions are the intersects in the $$x$$-axis. For example, suppose that the quadratic formula gives two values
68
 If the discriminant is positive, the quadratic formula gives two solutions to the equation $$0 = a x^2 + b x + c$$ and these solutions are the intersects in the $$x$$-axis. For example, suppose that the quadratic formula gives two values
70
 
69
 
71
 
70
 
72
 
71
 
73
-$$x=x_1$$
74
-$$x=x_2$$
72
+$$ x = x_1 $$
73
+$$ x = x_2 $$
75
 
74
 
76
 Then, 
75
 Then, 
77
 
76
 
107
 
106
 
108
 
107
 
109
 !INCLUDE "../../eip-diagnostic/quadratic-frog/en/diag-quadratic-frog-01.html"
108
 !INCLUDE "../../eip-diagnostic/quadratic-frog/en/diag-quadratic-frog-01.html"
109
+<br>
110
 
110
 
111
 !INCLUDE "../../eip-diagnostic/quadratic-frog/en/diag-quadratic-frog-08.html"
111
 !INCLUDE "../../eip-diagnostic/quadratic-frog/en/diag-quadratic-frog-08.html"
112
+<br>
112
 
113
 
113
 !INCLUDE "../../eip-diagnostic/quadratic-frog/en/diag-quadratic-frog-09.html"
114
 !INCLUDE "../../eip-diagnostic/quadratic-frog/en/diag-quadratic-frog-09.html"
115
+<br>
114
 ---
116
 ---
115
 
117
 
116
 ---
118
 ---
178
     
180
     
179
     1. You can obtain the GPA by adding the credit points corresponding to the grades (for example, an A in a 3 credit course has a value of 12 points), and dividing this sum by the total number of credits.
181
     1. You can obtain the GPA by adding the credit points corresponding to the grades (for example, an A in a 3 credit course has a value of 12 points), and dividing this sum by the total number of credits.
180
 
182
 
181
-    2. Remember that, in C++, when both operands in the division are integers, the result will also be an integer; the remainder will be discarded. Use "type casting": `static_cast\<type\>(expression)' to solve this problem.
183
+    2. Remember that, in C++, when both operands in the division are integers, the result will also be an integer; the remainder will be discarded. Use "type casting": `static_cast<type>(expression)` to solve this problem.
182
 
184
 
183
 3. Verify your program by computing the GPA of a student that has two A's and 2 B's; what is the grade of this student, A or B (A goes from 3.5 to 4 points)? When your program is correct, save the `main.cpp` file and submit it using "Deliver 2" in Moodle. Remember to follow the instructions regarding the names and types of the variables,  to include the names of the programmers, to document your program and to use good programming practices.
185
 3. Verify your program by computing the GPA of a student that has two A's and 2 B's; what is the grade of this student, A or B (A goes from 3.5 to 4 points)? When your program is correct, save the `main.cpp` file and submit it using "Deliver 2" in Moodle. Remember to follow the instructions regarding the names and types of the variables,  to include the names of the programmers, to document your program and to use good programming practices.

+ 8
- 12
README-es.md View File

1
-
2
 # Expresiones aritméticas - Sapo Cuadrático
1
 # Expresiones aritméticas - Sapo Cuadrático
3
 
2
 
4
 
3
 
7
 ![main4.png](images/main4.png)
6
 ![main4.png](images/main4.png)
8
 
7
 
9
 
8
 
10
-Las expresiones aritméticas son parte esencial de casi cualquier algoritmo que resuelve un problema útil.  Por lo tanto,  implementar expresiones aritméticas correctamente es una destreza básica en cualquier lenguaje de programación de computadoras. En esta experiencia de laboratorio practicarás la implementación de expresiones aritméticas en C++ escribiendo ecuaciones para la fórmula cuadrática y así completar el código para  un juego en el que un sapito brinca de una hoja a otra.
9
+Las expresiones aritméticas son parte esencial de casi cualquier algoritmo que resuelve un problema útil. Por lo tanto,  implementar expresiones aritméticas correctamente es una destreza básica en cualquier lenguaje de programación de computadoras. En esta experiencia de laboratorio practicarás la implementación de expresiones aritméticas en C++ escribiendo ecuaciones para la fórmula cuadrática y así completar el código para  un juego en el que un sapito brinca de una hoja a otra.
11
 
10
 
12
 
11
 
13
 ##Objetivos:
12
 ##Objetivos:
52
 
51
 
53
 donde $$a, b, c$$ son números reales y $$a\not=0$$. La gráfica de una ecuación cuadrática es una *parábola* que abre hacia arriba si $$a > 0$$ y abre hacia abajo si $$a < 0$$. 
52
 donde $$a, b, c$$ son números reales y $$a\not=0$$. La gráfica de una ecuación cuadrática es una *parábola* que abre hacia arriba si $$a > 0$$ y abre hacia abajo si $$a < 0$$. 
54
 
53
 
55
-Una gráfica interseca el eje de $$x$$ cuando $$y=0$$. Por lo tanto, si una parábola interseca el eje de $$x$$, los intersectos están dados por las soluciones reales de la ecuación
54
+Una gráfica interseca el eje de $$x$$ cuando $$ y = 0 $$ . Por lo tanto, si una parábola interseca el eje de $$x$$, los intersectos están dados por las soluciones reales de la ecuación
56
 
55
 
57
 $$0 = a x^2 + b x + c.$$
56
 $$0 = a x^2 + b x + c.$$
58
 
57
 
64
 
63
 
65
 Si el discriminante es positivo, la fórmula cuadrática nos dá dos soluciones a la ecuación $$0 = a x^2 + b x + c$$ y estas soluciones son los intersectos en el eje de $$x$$. Por ejemplo, supón que la fórmula cuadrática nos dá dos valores 
64
 Si el discriminante es positivo, la fórmula cuadrática nos dá dos soluciones a la ecuación $$0 = a x^2 + b x + c$$ y estas soluciones son los intersectos en el eje de $$x$$. Por ejemplo, supón que la fórmula cuadrática nos dá dos valores 
66
 
65
 
67
-$$x=x_1$$
68
-$$x=x_2$$
66
+$$x=x_1 $$
67
+$$x=x_2 $$
69
 
68
 
70
 Entonces, 
69
 Entonces, 
71
 
70
 
99
 
98
 
100
 
99
 
101
 !INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-01.html"
100
 !INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-01.html"
101
+<br>
102
 
102
 
103
 !INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-08.html"
103
 !INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-08.html"
104
+<br>
104
 
105
 
105
 !INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-09.html"
106
 !INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-09.html"
107
+<br>
106
 
108
 
107
 ---
109
 ---
108
 
110
 
170
 
172
 
171
     1. El promedio se obtiene sumando las puntuaciones  correspondientes a las notas obtenidas (por ejemplo, una A en un curso de 3 créditos tiene una puntuación de 12), y dividiendo esa suma por el número total de créditos.
173
     1. El promedio se obtiene sumando las puntuaciones  correspondientes a las notas obtenidas (por ejemplo, una A en un curso de 3 créditos tiene una puntuación de 12), y dividiendo esa suma por el número total de créditos.
172
 
174
 
173
-    2. Recuerda que, en C++, si divides dos números enteros el resultado se "truncará" y será un número entero. Utiliza "type casting": `static_cast\<tipo\>(expresión)' para resolver este problema.
175
+    2. Recuerda que, en C++, si divides dos números enteros el resultado se "truncará" y será un número entero. Utiliza "type casting": `static_cast<tipo>(expresión)` para resolver este problema.
174
 
176
 
175
 3. Verifica tu programa calculando el promedio de un estudiante que tenga dos A y dos B; ¿qué nota tendría este estudiante, A o B (la A va desde 3.5 a 4.0)?. Cuando tu programa esté correcto, guarda el archivo `main.cpp` y entrégalo  utilizando  "Entrega 2" en Moodle. Recuerda seguir las instrucciones en el uso de nombres y tipos para las variables,  incluir el nombre de los programadores, documentar tu programa y utilizar buenas prácticas de programación. 
177
 3. Verifica tu programa calculando el promedio de un estudiante que tenga dos A y dos B; ¿qué nota tendría este estudiante, A o B (la A va desde 3.5 a 4.0)?. Cuando tu programa esté correcto, guarda el archivo `main.cpp` y entrégalo  utilizando  "Entrega 2" en Moodle. Recuerda seguir las instrucciones en el uso de nombres y tipos para las variables,  incluir el nombre de los programadores, documentar tu programa y utilizar buenas prácticas de programación. 
176
 
178
 
177
 
179
 
178
-
179
-
180
-
181
 ---
180
 ---
182
 
181
 
183
 ---
182
 ---
184
-
185
-
186
-