edades=[12, 18, 25, 16, 30, 45, 17, 19, 21]
mayores=0

for edad in edades:
    if edad >= 18:
        mayores += 1

print(f"Hay {mayores} personas mayores de edad en la lista.")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: