This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "" |