Diseño+(S10G1)

 DISEÑO

 ,  · ¿Cómo llevara a cabo la solución? Variables y objetos a utilizar   o Para la realización del programa se utilizaran:  § 6 listados, los cuales serán desplegados con un cierto orden establecido.  § Se utilizará raw_input, para preguntar al usuario si el número se encuentra en la lista o no.  § Se utilizaran variables globales para llevar el conteo de los números, para así poder adivinar el número del usuario.  § <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Se utilizaran ciclos por medio de repeticiones ‘while’. Estas serán utilizadas cuando el usuario cometa errores en la respuesta. (González, ) <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Wingdings; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Wingdings; msobidifontfamily: Wingdings; msolist: Ignore;"> § <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Se utilizaran condiciones por medio de ‘if’, ‘elif’ y ‘else’. Para dar distintos resultados dependiendo si el usuario responde “SI” o “NO” a las preguntas planteadas. (Downey; Elkner & Meyers, 2008) <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Wingdings; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Wingdings; msobidifontfamily: Wingdings; msolist: Ignore;">§ <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Se utilizara upper, para transformar los caracteres introducidos por el usuario a mayúsculas, para la mejor manipulación de datos. (Anónimo, nd) <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: red; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES-CO;">Descripción del curso lógico de la solución del problema. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Courier New'; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: 'Courier New'; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: 'Courier New'; msolist: Ignore;">o <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El programa se basa principalmente en un sistema binario, o en un sistema exponencial de base 2. Del cual cada listado puede ser tomado en cuenta como un diferente exponente, siendo estos: 1, 2, 3, 4, 5, 6. Hasta 6 debido a que es el numero de listados que se despliegan en el programa. Esto se puede ver claramente en la siguiente tabla: <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">(Swanson, 2002) <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">(Togores, 1999) <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Listado || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"># 1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"># 2 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"># 3 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"># 4 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"># 5 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#6 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Binario || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Exponencial || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^0 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^2 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^3 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^4 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^5 || <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Para la resolución del problema planteada, tenemos que clasificar los listados mostrados según las siguientes condiciones: <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El primer listado muestra únicamente números impares del 1 a 63. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El segundo listado muestra una secuencia lógica de dos números seguidos, luego sumados por 3, luego 2 números seguidos hasta llegar a 63 comenzando en el 02.. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Courier New'; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: 'Courier New'; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: 'Courier New'; msolist: Ignore;">o <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Ejemplo: [ 02, 03, 06, 07…] <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El tercer listado muestra cuatro números seguidos a partir del 4. Luego se le suma 4, luego cuatro números seguidos hasta llegar a 63. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Courier New'; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: 'Courier New'; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: 'Courier New'; msolist: Ignore;">o <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Ejemplo [04, 05, 06, 07, 12…] <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El cuarto listado muestra una secuencia de de ocho números seguidos comenzando en 8, luego sumado 9, luego secuencia de ocho hasta llegar a 63. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El quinto listado muestra una secuencia de números desde 16 hasta 31 y luego una secuencia de 48 a 63. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El sexto listado muestra una secuencia de desde el 32 hasta 63. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Cada listado cumple con un propósito de acuerdo al sistema binario establecido a utilizar. Por último demostraremos por medio de tablas el funcionamiento del programa. Tomando como en cuenta que el numero a adivinar es 29. <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Listado || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#2 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#3 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#4 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#5 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">#6 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Respuesta || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">SI || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">NO || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">SI || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">SI || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">SI || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">NO || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Sistema || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^0 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^2 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^3 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^4 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">2^5 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Suma || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">+ 0 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">+ 4 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">+ 8 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">+ 16 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">+ 0 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Total || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">1 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">5 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">13 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">29 || <span style="font-size: 12pt; color: #4f81bd; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">29 || <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El numero planteado es 29. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: red; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES-CO;">Módulos de Python utilizados. Como se utilizaran en su programa. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Courier New'; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: 'Courier New'; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: 'Courier New'; msolist: Ignore;">o <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">El único modulo utilizado en el desarrollo del programa fue la importación de Doctest, este con el fin de realizar las pruebas para la comprobación del buen funcionamiento del programa. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Symbol; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Symbol; msobidifontfamily: Symbol; msolist: Ignore;">· <span style="font-size: 12pt; color: red; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES-CO;">Funciones desarrolladas por el programador. Para que se usan, parámetros esperados. <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;"> <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Courier New'; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: 'Courier New'; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: 'Courier New'; msolist: Ignore;">o <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Para el desarrollo del programa se utilizara: <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: Wingdings; mso-ansi-language: ES; mso-themecolor: accent1; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; msoansilanguage: ES; msothemecolor: accent1; msofareastfontfamily: Wingdings; msobidifontfamily: Wingdings; msolist: Ignore;">§ <span style="font-size: 12pt; color: #4f81bd; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent1;">Una función para cada listado mostrado. El parámetro dado será ‘respuesta’, el cual representará la respuesta dada por el usuario en cada una de las preguntas posteriores a los listados. Estas funciones incluirán variables globales, las cuales llevaran la cuenta dependiendo de la respuesta del usuario.

<span style="font-size: 12pt; color: #943634; line-height: 115%; font-family: 'Arial','sans-serif'; mso-themecolor: accent2; mso-themeshade: 191; msoansilanguage: ES; msothemecolor: accent2; msothemeshade: 191;">REGRESAR A INVESTIGACION CORTA <span style="font-size: 12pt; color: #943634; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent2; mso-themeshade: 191;"> <span style="font-size: 12pt; color: #c0504d; line-height: 115%; font-family: 'Arial','sans-serif'; mso-ansi-language: ES; mso-themecolor: accent2; msoansilanguage: ES; msothemecolor: accent2;">PAGINA INICIO