mnagaoormeeran
mnagaoormeeran mnagaoormeeran
  • 18-12-2020
  • Computers and Technology
contestada

X= [12,67,89,34,56,90,67]

Write a python program to bring the following output by using the given X.

Output:

[12,67,89,34,100,56,90,67]

​

Respuesta :

PlayersZero PlayersZero
  • 18-12-2020

Answer:

X = [12, 67, 89, 34, 56, 90, 67]

for i in range (len(X)):

   if (X[i] == 34):

       print(X[i])

       print("100")

   else:

       print(X[i])

Explanation:

Kind of a ugly hack because I'm not all too familiar with python, but it gets the job done :^)

Answer Link

Otras preguntas

When rocks grind and squeeze past each other,___metamorphism occur.
An advantage of using a debit card is: A) You can build up your credit B) You don’t have to record a transaction fee each time you use it to know your balance C
Comparing yourself to a triangle with 3 possible occupation/career choices, could this be compared to "congruent" rather than "equal"? Explain your thinking...
Complete these ordered pairs for this equation. (0, ), (-2, ), (4, ) y=2x
100 km per hour equals how many mph?​
-3(-5)-3y=-6 find the value of y
a) Sometimes, small stores continue to operate - even though they do not earn economic profits. Are such decisions logical?
What is the solution set of y = x2 + 2x + 7 and y = x + 7? A. {(0, 7), (-1, 6)} B. {(0, 7), (-7, 0)} C. {(0, 7), (1, 8)} D. {(-2, 0), (4, 0)}
anybody now how is the earth ground water and surface water replenished.
If the only information given about an oblique triangle is the lengths of the three sides, which method should you use to solve for the angles? A. Trigo