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

3(9-8x-4x)+8(3x+4)=11 how do I work this out???
A boat traveled 60 miles downstream and back. The trip Downstream took 3 hours. The trip back took 30 hours. What is the sleep of the boat in still water ? What
Please help!! 30 points if you answer. Answer ASAP!!Which word phrases can be modeled by the expression? Choose exactly two answers that are correct. A.ten less
Solving systems by substitution : y=5x-10 y=3x+8 I dont underatand how to solve it
What is 34% of 354? Also, can you show me how?
According to Thomas Hobbes, who should rule a government?
What is seperation of powers
Which empire included the territory that is now part of Turkey, Greece, and Egypt? A. Ottoman B. Safavid C. Mughal
Steve went to New Zealand with his parents for a summer vacation.  Electrical outlets in New Zealand are 220 volts instead of the 110 volts that Steve is used t
Many of the early Chinese literary works were destroyed by Select one: a. Mongol raids during the Shang dynasty. b. the wreck of a ship carrying the emperor's p