avkLab

Boules de glace

Jun 29th, 2022 (edited)
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #----------------------------------------------------------------------------
  4. # Created by  : Alain Van Kerckhoven
  5. # Created Date: 29 juin 2022
  6. # Licence     : GPL
  7. # Version     : 1.0
  8. # ---------------------------------------------------------------------------
  9. """
  10. Comment réaliser la liste des différents assortiments de deux boules
  11. boules de glace distinctes ?
  12. """
  13. # ---------------------------------------------------------------------------
  14.  
  15. parfums = ["Banane", "Chocolat", "Citron", "Pistache", "Cheval", "Fraise",  "Vanille"]
  16.  
  17. deja_pris = []
  18.  
  19. for i in parfums:
  20.     for g in parfums:
  21.         if g==i or g in deja_pris:
  22.             continue
  23.         else:
  24.             print(i, "-", g)
  25.     deja_pris.append(i)
  26.  
Advertisement
Add Comment
Please, Sign In to add comment