Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3768

Aide pour coder un scrypt de cryptograhpie

Newsgroups fr.comp.lang.python
Subject Aide pour coder un scrypt de cryptograhpie
From taarco <nospam_taarco.moi@gmail.com.invalid>
Organization !No_Organization!
Message-ID <8ridnf3Ir8p9rb__nZ2dnUU7_8zNnZ2d@giganews.com> (permalink)
Date 2022-03-04 09:31 -0600

Show all headers | View raw


Bonjour, j'ai commencé à créer mon code qui doit crypter un message à l'aide
d'une clé (C'est un devoir à rendre), mais je suis bloqué, et je en sais plus
comment faire, quelqu'un pourrait m'aider ? Voici mon code :

import random

alphabet = [i for i in 'abcdefghijklmnopqrstuvwxyz '] #liste par compréhension
phrase = input("Ecrivez une phrase:").lower()
clee=int(input("Clée :"))

Alphabet_Melange=[i for i in 'abcdefghijklmnopqrstuvwxyz ']
random.shuffle(Alphabet_Melange)
print(Alphabet_Melange)
final=""
for i in phrase:
    n_Lettre = alphabet.index(i)
    print(n_Lettre)
    final+=Alphabet_Melange[n_Lettre]
print(final,Alphabet_Melange)

Back to fr.comp.lang.python | Previous | Next | Find similar


Thread

Aide pour coder un scrypt de cryptograhpie taarco <nospam_taarco.moi@gmail.com.invalid> - 2022-03-04 09:31 -0600

csiph-web