Question: Code Python: Generate three random floating-point numbers between 100 and 350. Call them float1, float2, and float3. Convert float1, float2, and float3 to lists respectively
Code Python:
- Generate three random floating-point numbers between 100 and 350. Call them float1, float2, and float3.
- Convert float1, float2, and float3 to lists respectively named list1, list2, and list3, each comprised of the numerals that make up the number. For example, 304.4857487 converts to [3,0,4,4,8,5,7,4,8,7].
- Concatenate (i.e., join) the three lists together to comprise a single, combined list called grand_list.
- Using a loop, move those member elements of grand_list that are divisible by 4 out of this list and into a new list called divisible.
- Calculate the lengths of grand_list and divisible and store the mean of these two values in a new variable called list_lgth_mean.
- Print(list_lgth_mean).
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
