Answer to Question #254370 in Python for Hazel

Question #254370

3. Decimal Count-off

by CodeChum Admin

Counting off a list of decimal numbers is hard when you speak it, but not when you code it! Don't believe me? Then let's try coding just that!


Instructions

  1. A list containing 10 predefined float values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last list element down to the first.

Output

Multiple lines containing a decimal number.

5.1
5.5
4.00001
4.024
3.0
3.66
2.5
2.2
1.2054
1.4
1
Expert's answer
2021-10-21T00:50:38-0400
l = [ 5.1, 5.5, 4.00001, 4.024, 3.0, 3.66, 2.5, 2.2, 1.2054, 1.4 ]

for i in range(9, -1, -1):
    print(l[i])

Output:
1.4
1.2054
2.2
2.5
3.66
3.0
4.024
4.00001
5.5
5.1

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

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS