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
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702975247tsxgdjunrxlekpcwesufpdmcid4fdypbpdvxd2tobnymlzyuj7woqrjqzguqlhnegd8t2lmog9nrz4p8wbtsg1dv2nsh9wy6j7bp.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/M9cQoK86yX2hpKoPcN8KzPufgjirHatiKNITQGcLWnHVZx70UjxW391HdGyL6AFuBstBlOCBCMgoZkTJoZOmpLnf.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702976861sjs1igevrdgzkudmczy5icl05vflr0pzo7bwwzmmlap3rt0w8kbd5v3ujyzz9xqpxu7mnrfag9txf3akbxfxhq2nxw9qbg8eas5j.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11703066039w2abmyzxmnboyezb5fkbyo0hjghnuvyipwlslg9ayca6ni8ouq9abbj2bwvpgnwkqukno2ezumcrul44ogdz3qvlptl8zct3w8gl.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/MXleobLtUO0EKEVT2mxCiugRO7iZUeGs9JnWSBpi1CrZYBb1WFqS2SXlSjdvPV91bFxrOye576QoF8Rk7sWa7LNA.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702894860gzyd9h3xk7rrpilczagwykdmivgxcphero8zskgakqjgxxmq5hlotkr8z8wtvoum82b8cezzf29gfjpwmgsmrg26nxulq2woffox.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11703071294ycz6jq1pfqsjy4fvgclm2ajljxzlhozlyuglhd8fzqdjbvkwgdilmtork3tddg3ysbb8eesofocfgzpob557ga8rcpfyd5grqz8w.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/117033317546wi3eogobu8vl8khwt6pcf5amtmppxgklecuvho5lixn4ntixnc7miirxscmwy2dixxyrut7qgcr3xfqkfrdwzqsxptnssebs4pm.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11703147003foaile1b91aim8tweufyeku4xfczh02dnmrtr0cvqg3udfuohqss3p57zu3a51s9bru0voxalc1asjlcg5vfkpo4uqshvqd1p69w.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/vhnyFDHax3mU9LTjyzuS7nm2SOJ0XPdNCw2hO7US928lTJWfmc2YZYjmWTSd60CP2QOVzIfiT0HhgULNSJjGO0U3.png)
-
32
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise- Détails
- Publié le Aoû 05, 2021
- Catégorie Literature / Litté...
- Langue French
- Taille du fichier 37.3kB