Answer to Question #291906 in Python for Karan

Question #291906

Create a sequence of numbers from 15 to 25 and increment by 4. What is the index of the value 19


1
Expert's answer
2022-01-29T09:05:18-0500
# Create a sequence of numbers from 15 to 25
L = [i for i in range(15, 26)]

# Increment by 4
for i in range(len(L)):
    L[i] += 4

idx = L.index(19)
print("The index of value 19 is {}".format(idx))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

UJWALA KHAKAL
09.10.23, 12:33

answers are correct

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS