Question: Creates a function called zacatel that has as parameters a list of numbers x and a z number. The function you must return the value

Creates a function called zacatel that has as parameters a list of numbers x and a z number. The function you must return the value of S that is calculated using the formula: In this expression, p represents the last position in the x-y list, in general xi repCreates a function called zacatel that has as parameters a list ofresents the number i in the list position. a. (25 points) Creates a version of the function where a for loop is used to calculate S. b. (25 points) Creates a version of the function where a while loop is used to calculate S. c. (25 points) Run the program manually ("hand simulation" or desktop test) using the values given below. Assume that z has a value of 0.6443 and that x has a value of [3, 9, 9]. Present in detail as I arrive at your final reply. In your final answer, include up to 4 numbers after the decimal point

Crea una funcin llamada zacatel que tenga como parmetros una lista de nmeros xy un nmero z. La funcin debe devolver ("return") el valor de S que es calculado usando la frmula: 1 S = z+ +1 Xi - 1 i=0 En esta expresin, p representa la ltima posicin de la lista x y, en general x representa el nmero que se encuentra en la posicin i de la lista. a. (25 puntos) Crea una versin de la funcin en donde se use un for loop para calcular S. b. (25 puntos) Crea una versin de la funcin en donde se use un while loop para calcular S. C. (25 puntos) Ejecuta el programa manualmente ("hand simulation" o prueba de escritorio) usando los valores dados a continuacin. Suponga que z tiene un valor de 0.6443 y que x tiene un valor de [3, 9,9]. Presente detalladamente como llego a su contestacin final. En su contestacin final, incluya hasta 4 nmeros despues del punto decimal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!