Loops are used to perform actions over and over again until a condition is met (or until a condition is …