key = list (range (150, 180, 3))
Standard weight = (height - 100) * 0.9
for i in range(10):
print (i + 1, height [i], "cm", standard weight, "kg")
![Image][1]
[1]: https://res.cloudinary.com/eightcruz/image/upload/v1622874501/hnjzv3jscdcdznyhjtqr.png
list python
Because the "key" is in the form of a list You have to extract each element from the key list.
key = list (range (150, 180, 3))
for i in range(10):
Standard weight = (height[i] - 100) * 0.9
print (i + 1, height [i], "cm", standard weight, "kg")
© 2025 OneMinuteCode. All rights reserved.