Question & Answer: Create a function that allows a user to enter a series of numbers. Those numbers get stored as floats in a list……

Create a function that allows a user to enter a series of numbers. Those numbers get stored as floats in a list.
The list is returned.
Python 3
def userNumberList():
#enter your code here
def main():
print(userNumberList())
main()

Expert Answer

 

Python 3 Code:

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: Create a function that allows a user to enter a series of numbers. Those numbers get stored as floats in a list……
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay
def userNumberList():
    #Taking input from the user and saving it as a float in the numbers list
    numbers = [float(x) for x in input("Enter the series of numbersn").split()]
    return numbers

def main():
    #printing the numbers list
    print(userNumberList())

#Calling the main function
main()

**Screenshot of same input and output:

Question & Answer: Create a function that allows a user to enter a series of numbers. Those numbers get stored as floats in a list...... 1

 

Still stressed from student homework?
Get quality assistance from academic writers!