Math for - Loops

  1. A robotic arm stacks identical blocks, each with a height of $h = 5 \text{ cm}$. The arm continues stacking blocks one by one until the total height of the stack is greater than or equal to $H = 67 \text{ cm}$. How many blocks, $n$, will be in the stack when the robot stops?

  2. A numerical sequence starts with the first term $a_1 = 2$. Each subsequent term is found by adding $d = 4$ to the previous term. Determine the smallest number of terms, $k$, such that the $k$-th term, $a_k$, is greater than 50.

  3. A container initially holds $V_0 = 10$ units of a substance. In each step of a process, $V_{add} = 3$ units of the substance are added. How many steps, $s$, are required for the total amount of substance in the container to be at least $V_{final} = 55$ units?

  4. A value $N$ begins at $N_0 = 90$. In each step, if $N$ is divisible by 5, $N$ is updated to $N/5$. Otherwise, $N$ is updated to $N-7$. The process stops when $N \le 10$. List the sequence of values of $N$ starting from $N_0$ until the process stops.

  5. An automated system assembles components. In the first cycle, it assembles $C_1 = 3$ components. In each subsequent cycle, it assembles 2 more components than in the previous cycle (i.e., $C_2 = 5$, $C_3 = 7$, and so on).

    1. Calculate the total number of components assembled after 6 cycles.

    2. What if, due to a system constraint, the number of components assembled in any single cycle cannot exceed 10? Calculate the total number of components assembled after 6 cycles under this new constraint.