Answer:
F# Code:
let rec prefix n list =
//Extracting head and tail elements
let valHead = (Listhead list)
let valTail = (Listtail list)
// Checking n value
match n with
| 0 -> []
| _ -> [valHead] at (prefix (n-1) valTail) // Creating list recursively
//Testing function
let lstT = [1; 2; 3; 4; 5]
printfn "%A" (prefix 3 lstT)
printfn "%A" (prefix 2 lstT)
printfn "%A" (prefix 4 lstT)
Step-by-step explanation: see attachment below for sample run
Answer:
Io
Step-by-step explanation:
Earth's moon makes a person weigh about 1/6 of their Earth weight. Io makes a person weigh more than that, because 1/6 of 150 pounds is 25 pounds.
Answer:
6 cm by 17 cm
Step-by-step explanation:
The area is the product of the dimensions; the perimeter is double the sum of the dimensions.
So, we want to find two numbers whose product is 102 and whose sum is 23.
102 = 1·102 = 2·51 = 3·34 = 6·17
The last of these factor pairs has a sum of 23.
The dimensions are 6 cm by 17 cm.
Answer:
The required number is 7.
Dividing by this gives the perfect square 676.
Step-by-step explanation:
Finding the prime factors:
2) 4732
2) 2366
7) 1183
13)169
13
So 4372
= 2^2 * 7 * 13^2
= 4 *169 * 7
= 676 * 7
Now 676 is a perfect square so the answer is 7.
= 1283 * 4.
Answer is 1283.