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

Statements: Some papers are pen.All pencils are pens.Conclusion: i) Some pens are pencilsii) Some pens are papersa. Only (i) followsb. Only (ii) followsc. Eithe
Indians, like the Cherokee and the Creeks were removed and relocated to
What is 10 times 7 thousands in unit form
To reach its intended destination on time a cruise ship needs to travel north at 70 mph. However, it is travelling in the Gulf of Mexico where there is a Gulf S
How many pairs of legs do insects have? five four three
Twice the total of a number and three.
What was a negative effect of growing tobacco?
Find the value of c that makes the trinomial a perfect square. Find the value of c that makes x2 – 2x + c a perfect square trinomial. a 1 b 2 c -1/2 d –4
paying attention to trends that might impact your future career is called
The test statistic of zequals 2.03 is obtained when testing the claim that not equals 0.155. a. Identify the hypothesis test as being​ two-tailed, left-tailed,