def random_animal():
animal_images = [bee, chicken, dog, duck, horse, pig, sheep, cat, fish, squirre, turtle, frog, parrot, penguin, giraffe]
for i in range(30):
animal_random = random.choice(animal_images)
bee_count = 0
chicken_count = 0
dog_count = 0
duck_count = 0
horse_count = 0
pig_count = 0
sheep_count = 0
cat_count = 0
fish_count = 0
squirre_count = 0
turtle_count = 0
frog_count = 0
parrot_count = 0
pengiun_count = 0
giraffe_count = 0
if animal_random == animal_images[0]:
bee_count += 1
if bee_count == 1 or bee_count == 2:
return animal_random
continue
elif bee_count == 3:
animal_random
if animal_random == animal_images[1]:
cat_count += 1
if cat_count == 1 or cat_count == 2:
return animal_random
continue
elif cat_count == 3:
animal_random
if animal_random == animal_images[2]:
chicken_count += 1
if chicken_count == 1 or chicken_count == 2:
return animal_random
continue
elif chicken_count == 3:
animal_random
if animal_random == animal_images[3]:
dog_count += 1
if dog_count == 1 or dog_count == 2:
return animal_random
continue
elif dog_count == 3:
animal_random
if animal_random == animal_images[4]:
duck_count += 1
if duck_count == 1 or duck_count == 2:
return animal_random
continue
elif duck_count == 3:
animal_random
if animal_random == animal_images[5]:
horse_count += 1
if horse_count == 1 or horse_count == 2:
return animal_random
continue
elif horse_count == 3:
animal_random
if animal_random == animal_images[6]:
pig_count += 1
if pig_count == 1 or pig_count == 2:
return animal_random
continue
elif pig_count == 3:
animal_random
if animal_random == animal_images[7]:
sheep_count += 1
if sheep_count == 1 or sheep_count == 2:
return animal_random
continue
elif sheep_count == 3:
animal_random
if animal_random == animal_images[8]:
fish_count += 1
if fish_count == 1 or fish_count == 2:
return animal_random
continue
elif fish_count == 3:
animal_random
if animal_random == animal_images[9]:
squirre_count += 1
if squirre_count == 1 or squirre_count == 2:
return animal_random
continue
elif squirre_count == 3:
animal_random
if animal_random == animal_images[10]:
turtle_count += 1
if turtle_count == 1 or turtle_count == 2:
return animal_random
continue
elif turtle_count == 3:
animal_random
if animal_random == animal_images[11]:
frog_count += 1
if frog_count == 1 or frog_count == 2:
return animal_random
continue
elif frog_count == 3:
animal_random
if animal_random == animal_images[12]:
parrot_count += 1
if parrot_count == 1 or parrot_count == 2:
return animal_random
continue
elif parrot_count == 3:
animal_random
if animal_random == animal_images[13]:
pengiun_count += 1
if pengiun_count == 1 or pengiun_count == 2:
return animal_random
continue
elif pengiun_count == 3:
animal_random
if animal_random == animal_images[14]:
giraffe_count += 1
if giraffe_count == 1 or giraffe_count == 2:
return animal_random
continue
elif giraffe_count == 3:
animal_random