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

Witch statement correctly compares the “analysis” and “conclusion” section of a lab report
If anybody could answer this ASAP would really appreciate it.
Elena drank 3 liters of water yesterday. Jada drank 34 times as much water as Elena. Lin drank twice as much water as Jada. Did Jada drink more or less water th
Calculate 12% simple interest to be paid on a loan of $2000 repaid in 1 1/2 year?
Which region specializes in diamonds? ĆE O Central America O Middle East O Europe O Sub-Saharan Africa
A car traveled 420 miles in 7 hours how many miles did it travel per hour?
How would the Union winning the war give "a new birth of freedom" to the United States?
the density is 5.4 g/mL and the volume is 12.9 mL.
Place the following events in order to trace the development of human societies. Humans survived by hunting and Advanced civilizations People could farm and sto
What helps the plasma membrane function? channels and chain-like structures O pumps and gelatin-like material O nuclei and endoplasmic reticula O chloroplasts a