Home > front end >  Just pythoin won't start
Just pythoin won't start

Time:12-20

There is a group of handmade box, a total of 50, their sizes, please calculate the total volume of this batch of box programming and the average volume,
data=https://bbs.csdn.net/topics/[(87, 71, 70), (100, 61, 70), (80, 77, 80), (95, 73, 73), (97, 70, 65), (95, 65, 68), (92, 65, 66), (100, 79, 76), (85, 61, 80), (91, 71, 71), (91, 60, 79), (80, 70, 68), (83, 65, 78), (81, 70, 67), (85, 80, 75), (86, 66, 60), (83, 70, 69), (80, 79, 67), (96, 67, 67), (90, 70, 60), (90, 74, 71), (89, 68, 65), (84, 68, 66), (92, 68, 74), (92, 70, 64), (96, 65, 73), (100, 62, 77), (87, 74, 63), (100, 74, 71), (89, 64, 74), (88, 65, 79), (96, 63, 67), (89, 69, 71), (88, 74, 75), (88, 75, 73), (93, 75, 72), (87, 76, 64), (90, 74, 80), (81, 80, 76), (98, 65, 74), (88, 70, 67), (89, 69, 76), (82, 71, 71), (93, 68, 73), (92, 62, 64), (91, 77, 65), (96, 80, 76), (81, 68, 69), (91, 65, 78), (96, 62, 62)]
Data a total of 50 yuan group, each tuple has three values, corresponding long, wide, high,
Your Mission:
1. Iterate over the list of tuple;
2. In the cycle, through the tuple will unpack the three numerical assignment length respectively at the same time, the width and height of three variables;
3. Calculate the volume of each case, and to save the result as a new list V;
4. List all the value in the V and list (i.e., the total volume), and the length of the V;
5. Calculate and output the average volume,
  • Related