Computer Science, asked by lalitmali, 1 day ago

write a program to read 10 flot number from user in an arrey and display then​

Answers

Answered by MichMich0945
1

Python program:

# Initialize an empty list

list = []

# Print a message to ask the user to input

# 10 floats

print("Enter 10 floats...")

# Create a for-loop which will repeat 10

# times and each time it will take input from

# the user and add it into the list

for index in range(0, 10):

   list.append(float(input()))

# Finally, print the list.

print("Here is your list:-\n", list)

Explanation is provided in the comments...

Output:

Hope this helps you!

Attachments:
Similar questions