Assignment 1-Computational Thinking

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Assignment 1-Computational Thinking

1) a) The first snail will take 15 days to climb the well because he moves up 1 meter every
day (5-4 = 1). At the end of the 16th day, it comes out, since it will be already out (15 + 5 = 20)
and would not have to lose another 4 meters while sleeping.
Therefore we have: 15 days + 1 = 16 days for the snail to get out of the well.
To solve this problem, we have divided the problem into several subproblems or steps. In
this case there are 2 steps, calculating the number of days during which the snail advances one
meter and then finding out in which day he comes out.

b) Given that there are no other details given, there are three possibilities :
- The fact that both snails are climbing at the same time does not affect the duration of the
journey
- The 2 snails help each other to climb the well quicker and therefore end up out before
the 16 days have passed by.
- The 2 snails are climbing the well with the same trajectory and are disturbing each
other’s journey and therefore it will take more than 16 days for them to get out.
Considering that there are no details presented in this problem other than their
weight, which does not seem useful, we could conclude that it would still take them only 16 days
to get out of the well.

2) To solve this problem, we can easily take a mathematical approach and make use of
formulas or equations:

c = number of chickens
t = number of turkeys
x = price of one chicken
y = price of one turkey

- c + t = 88 and c = 36 + t. Therefore we can find out the values of c and t.


- 36+ t + t= 88 ⇔ 2*t = 88 - 36 ⇔ t = 52 / 2 ⇔ t = 26.
If t =26, then c = 36 + 26 = 62. So, among 88 animals there are 26 turkeys and 62
chickens.

We also know that y = 3 * x and x + y = 12. Then, x + 3 * x = 12 ⇔ 4 *x = 12 ⇔ x = 3.


If x = 3, then y = 9. So the price of one chicken is 3 euros, whereas the price of one
turkey is 9 euros.
To conclude, if the farm sells half of the chickens and half of the turkeys, they would
make ½ * 62 * 3 + ½ * 26 * 9 = 93 + 117 = 210. ( We multiply the number of each animal by the
price that they go for and then by ½ since only half of them are sold). The farm would all in all
make 210 euros.

3) To solve this problem we have to figure out how we can divide the 10 L of wine into two equal
parts only with the 3 barrels. We can divide the problem into smaller steps until we reach the
solution. We can see that the quickest and most efficient way to solve this problem is to take 9
steps, as done below:

10 L max 7 L max 3 L max Capacity of each


barrel.

10 0 0 Initial Situation.

0 7 3 More moves are


required.

3 4 3 Continuing moving
the wine.

6 4 0 Intermediate steps
towards the result.
6 1 3

9 1 0

9 0 1

2 7 1

2 5 3 Getting there.

5 5 0 We seem to have
arrived to the desired
result with the least
amount of moves.

4) To solve this last problem we can make use of formulas and equations.

What we have to do is add the number of oranges in the three crates ( 32 +21 + 29) to the
number of the oranges from the new shipment (143) and then we need to divide that final
number by 3 to find out how many oranges there will be in each crate. To find out the number of
oranges added to each crate, we only subtract the initial value from each of the three crates.
Total number of oranges : 32 + 21 + 29 + 143 = 225.

Number of oranges in each crate : 225/ 3 = 75.

Therefore:- there are 75 - 32 = 43 oranges added to the 1st crate.


- there are 75 - 21 = 54 oranges added to the 2nd crate.
- there are 75- 29 = 46 oranges added to the 3rd crate.

To conclude, with the use of the three equations, we found that there are 43, 53 and 46 oranges
added to each crate, in this order.

You might also like