Skip to content

Instantly share code, notes, and snippets.

View cazeip's full-sized avatar

Cazeip cazeip

View GitHub Profile
@cazeip
cazeip / vigenere.py
Created February 16, 2022 16:32
Vigenere
from math import *
def encrypt():
key = input("Veuillez entrer votre cle\n(lettres, sans espace)\n$ ").lower()
msg = input("Veuillez entrer le message\n$ ").lower()
calculateEncryption(key, msg)
def calculateEncryption(key, msg):
str = ""
@cazeip
cazeip / destalk.py
Last active December 6, 2022 17:21
destalk
# This comment was added automatically to allow this file to save.
# You'll be able to remove it after adding text to the file.
from random import *
def cartes1(n):
coul=['Trefle','Carreau','Coeur','Pique']
vale=['7','8','9','10','Valet','Dame','Roi','As']
main=[]
while len(main)<n:
carte="{} de {}".format(choice(vale),choice(coul))
if carte not in main : main.append(carte)
# Résolveur de Sudoku
grille = [
[0,0,0,0,4,0,0,7,0],
[0,0,6,0,2,0,0,0,0],
[5,0,0,7,0,6,0,0,9],
[0,0,5,3,0,1,0,2,0],
[0,0,0,0,6,0,0,0,0],
[9,0,0,0,0,0,8,0,0],
[0,3,0,0,0,0,0,0,2],