Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need some help with this programming assignment this needs to be in python format please Task 5: Obtaining floats from a User For this
I need some help with this programming assignment
this needs to be in python format please
Task 5: Obtaining floats from a User For this task you'll define two functions in an IDLE Editor window: . get.floats (): This non-void function takes a single integer argument which is the num- ber of floats to be obtained from the user. It creates an empty list, uses a for-loop to prompt and obtain floats from the user, appends each float to the list it created, and returns the list. * main ): This non-void function takes no arguments. It prompts the user for the number of floats /he wants to enter, and it calls get.floats ) with the integer value entered by the user. A list is returned to main) which then print the results. The output for both functions is shown below i Enter the number of list elements: 3 2 Enter float 1: 25.1 Enter float 2: 19.3 4 Enter float 3: 47.8 s [25.1, 19.3, 47.8] 7 Enter the number of elements: 4 s Enter float 1:2 9 Enter float 2:4 o Enter float 3: 8 Enter float 4: 10 12 [2.0, 4.0, 8.0, 10.0] Don't forget to include a call to main).Hints: Don't forget to convert your input as appropriate. A simple one-argument range function can be used as the iterable in the for-loop headerStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started