Question: import random lst ] for i in range(num): lst. append (random.uniform (0,10000)) This code will produce num float numbers between 0 and 10000 and store
import random\ lst ]\ for i in range(num):\ lst. append (random.uniform (0,10000))\ This code will produce num float numbers between 0 and 10000 and store them in\ the list lst. I suggest you print lst and review the contents, i.e. get to know the data.\ Processing (11 points)\ Use a for loop, that iterates through the loop num times to get num numbers\ from lst.\ Use the String method format() to print up to 3 numbers in a line with 5 spaces\ between the columns. The value in each column must be right aligned and\ formatted with 2 digits after the decimal point and a comma, ", " in the\ thousandths position. There may be 3,2 , or 1 number in the last printed line.\ Test Data:\ O Call the function at the IDLE prompt.
![import random\ lst ]\ for i in range(num):\ lst. append (random.uniform (0,10000))\](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45056662e8_38166f45055b659e.jpg)
import random lst =[] for i in range(num): lst. append (random. uniform (0,10000) ) This code will produce num float numbers between 0 and 10000 and store them in the list lst. I suggest you print lst and review the contents, i.e. get to know the data. - Processing (11 points) Use a for loop, that iterates through the loop num times to get num numbers from lst. - Use the String method format() to print up to 3 numbers in a line with 5 spaces between the columns. The value in each column must be right aligned and formatted with 2 digits after the decimal point and a comma, ", " in the thousandths position. There may be 3,2 , or 1 number in the last printed line
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
