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:

  1. Generate three random floating-point numbers between 100 and 350. Call them float1, float2, and float3.
  2. 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].
  3. Concatenate (i.e., join) the three lists together to comprise a single, combined list called grand_list.
  4. 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.
  5. Calculate the lengths of grand_list and divisible and store the mean of these two values in a new variable called list_lgth_mean.
  6. Print(list_lgth_mean).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!