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

Bio homework help :)? Two populations of birds with somewhat different coloration live on opposite sides of a peninsula. The habitat between the populations is
If Skyler uses 60 liters in each of the 4 weeks next month, will she use more or less than she uses this month? Show your work.
Animals that advertise their poisonous or dangerous qualities use a defense called ________ mimicry. mullerian batesian
What do scientist use to clean fossils?
Which secretion is not a barrier that prevents pathogens from entering the body?
When do we use statistics in real life?
Can Someone Explain This Quote? "May the bridges I burn light the way." What does that mean?
ln what quadrant would the ordered pair (12, -35) be located?
Algebra II. Radical expressions. Rationalize each denominator and show work.
Consider the causes and costs of the war, the Treaty of Ghent, and the impact of the war on the American people. Was the War of 1812 worth fighting? Did it help