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

Janis has found that she must consume 1,600 calories a day to reach her health goals, but she doesn't want to give up her morning cereal. Unfortunately, she te
Below are two different functions, f(x) and g(x). What can be determined about their y-intercepts? f(x) = 4x − 1 x g(x) 1 3 4 6 7 9 ans
Y varies directly as x. If y =-5 when X= 15, find x when y =3
If you were asked to convert 25 kg to the unit mg, which of the following would be the first fraction used in the conversion? (2 points)1 kg10 g10 g1kg
Please help me with these two questions. And can you tell me how to do this! Thanks you
Why must you use the same number of beads when you construct the second chromosome
Which plant groups do male gametes depend on the water or moisture to swim towards the ovum
If f(x)=[x]-5 what Is f(8.6)
Where are seeds produced in a plant
Given that Triangle ABC is congruent to triangle DEC find the value of x. If necessary, round your answer to two decimal places.