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

Empareja la frase con el error en negrita con la razón por el error. Match sentence with bolded error with the correct type of error.Match Term Definition¿Porqu
help please and thank you
Aaron bought a bagel and 3 muffins for $7.25. Bea bought a bagel and 2 muffins for $6. How much is a bagel and how much is a muffin?
What is the quotation of m and 7
I really need help with m-2=5
Which of the following policies would have the GREATEST impact on reducing pollution caused by fertilizer runoff? (3 points) Offer a tax credit for farmers who
PSYCHOLOGY HELP True or False questions. If true or false explain why. Please give good explanation to each question is T or F. 1. The titles psychologists
Why might the stock market have appeared to be a sure way to make money prior to the great crash of 1929
HELPP MEEEGIVE THE CROWNNN!!!!!!
Select all that apply. The large-scale migration that took place during the Middle Ages caused _____. cultures to mix overpopulation of Europe rapid populatio