loops are used to execute a block of code repeatedly based on a condition. There are three main types:
for loop – repeats a block a known number of times.
while loop – repeats as long as a condition is true.
do-while loop – executes the block at least once, then repeats while the condition ...