-- May 11 In-Class Exercise Thread
Input List L = <50,51,55,70,71,82,83,94,99>
đť›… = 0.1
L’ = <50>
50 * 1.1 = 55, skip 51 and 55
L’ = <50, 70>
70 * 1.1 = 77, skip 71
L’ = <50, 70, 82>
82 * 1.1 = 90.2, skip 82, 83, 84
L’ = <50, 70, 82, 99>
<50, 70, 82, 99>
Elements within (1+đť›…) factor of list elements = 51, 55, 71, 83, 84. we can remove them from the list, keeping the rest in the list.
Trimmed list L' = <50,70,82,99>
(
Edited: 2022-05-16)
Input List L = <50,51,55,70,71,82,83,94,99>
đť›… = 0.1
L’ = <50>
50 * 1.1 = 55, skip 51 and 55
L’ = <50, 70>
70 * 1.1 = 77, skip 71
L’ = <50, 70, 82>
82 * 1.1 = 90.2, skip 82, 83, 84
L’ = <50, 70, 82, 99>
<50, 70, 82, 99>
Elements within (1+đť›…) factor of list elements = 51, 55, 71, 83, 84. we can remove them from the list, keeping the rest in the list.
Trimmed list L' = <50,70,82,99>