Correction bac2014 Correction du problème bac Niveau ieme année sciences math Proposé par Bassem Amor Année scolaire Clecture Verif msg Programme principal cryptage crypter msg remplir msg t n dist t n t Cfonction lecture fonction Verif msg Programme prin

Correction du problème bac Niveau ieme année sciences math Proposé par Bassem Amor Année scolaire Clecture Verif msg Programme principal cryptage crypter msg remplir msg t n dist t n t Cfonction lecture fonction Verif msg Programme principal cryptage fonction crypter msg procedure remplir msg t n procedure dist t n t CAlgorithme du programme principal Algorithme cryptage Début msg lecture s crypter msg Écrire Le message crypté est s ?n T D O G objet msg s lecture crypter type chaine chaine fonction fonction CAlgorithme de la fonction lecture Fonction lecture chaine Début Répéter Ecrire taper le message Lire msg Jusqu ? à verif msg et pos msg - Retourner msg ?n T D O L objet msg verif type chaine fonction CAlgorithme de la function verif fonction verif ch chaine booléen Début dep i valide vrai tantque valide et i T D O L objet dep i valide type chaine entier booléen CAlgorithme de la fonction crypter Fonction crypter msg chaine chaine Début Remplir msg T i dist T i T ch Pour j de à long T faire ch ch T j Fin pour ch e ?acer ch long ch - long ch Retourner ch ?n T D N T type Tab tableau de chaines T D O L objet T T i j ch type Tab entier chaine CAlgorithme de la procedure remplir Procedure remplir msg chaine T tab i entier Début i ch msg ?? max Tantque ch ?? faire p pos ?? ?? ch T i souschaine ch p ch e ?acer ch p i i si p max alors max p ?nsi Fin tantque Pour j de à i- faire l long T j pour k de à max-l faire T j T j ?? ?n pour Fin pour ?n T D O L objet p k j l ch type entier entier entier entier chaine CAlgorithme de la procedure dist Procedure dist t tab r entier T tab Début Pour k de à r faire ch T k pour j de à long ch - faire T j T j ch j ?n pour Fin pour ?n T D O L objet k j ch type entier entier chaine Cimport numpy as np module verif def verif ch dep i valide True while valide and i module remplir def remplir t msg ch msg ' ' max i while ch '' p ch ?nd t i ch p ch ch p i i if p max max p for j in range i l len t j for k in range max- l t j t j ' ' return i module dist def dist T r T for k in range r ch T k for j in range len ch T j str T j ch j module crypter def crypter msg T np array '' dtype str i remplir T msg T np array '' len T dtype str i dist T i T ch for j in range

Documents similaires
Introduction reg logistique avec r 0 0
Rapport de stage vjn CRésumé Dans le cadre de mon projet de ?n d ? études j ? ai eu l ? occasion d ? e ?ectuer un stage d ? une durée de trois mois au sein de l ? O ?ce Chéri ?en des Phosphates OCP S A Je fus ainsi a ?ectée à la Direction Comptabilité et 0 0
75528_V7_12/06/2019 www.gys.fr FR EN DE ES RU NL IT 02-08 / 51-58 09-15 / 51-58 0 0
Pr: Mme Saida Hamidi 1 2 Introduction Le marketing inventé aux Etats Unis au d 0 0
Keskon attend n049 1 K ? eskon attend Gratuit Le journal des impatients Jeux vidéos Harcèlement sexuel ? n Juin CSommaire p L ? ennui en cours Edito p le harcèlement sexuel p - Les rela ons profs élèves p - dossier Gamers Asembly p Fans de roues p vivemen 0 0
Biblio inde litt Bibliothèque nationale de France direction des collections département Littérature et art ART ET LITTERATURES DE L ? INDE BIBLIOGRAPHIE Mars Rédigée à l ? occasion du Salon du livre dont l ? Inde est l ? invité d ? honneur cette bibliogra 0 0
Carrefour market 1 CARREFOUR MARKET L'histoire de Carrefour a commencé il y a plus de ans avec son père fondateur Marcel Fournier entrepreneur-visionnaire et l'ouverture du er hypermarché en France Carrefour a gardé un état d'esprit de pionnier et continu 0 0
Le symbolisme et la decadence mallarmee lautreamont verhaeren laforgue huysmans le neosymbolisme claudel et le neoclassicisme valery 0 0
support formationj3 v02 mode de compatibilite 0 0
Plaquette bts assistanat de direction uvpt 1 0 0
  • 31
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise
Partager