far Posted June 6, 2014 Report Share Posted June 6, 2014 Vreau si eu sa fac un mic program si sa faca urmatorul lucru:Eu scriu de exemplu "salut ce faci?" si programul sa imi traduca fraza aia intr-un anumit cod care sa il pun eu, de exemplu "$!"$%&&$" (fiecare simbol din ala ii pun eu o litera...a, b, c, etc), si un al doilea individ care are programul sa poata sa traduca codul ala si sa vada ce i-am scris....nu cer sa imi spuneti cum sa fac pas cu pas, macar ce limbaj de programare sa folosesc si cum sa incep..mersi Quote Link to comment Share on other sites More sharing options...
SticKyWoX Posted June 6, 2014 Report Share Posted June 6, 2014 php, cu functia str_replace Quote Link to comment Share on other sites More sharing options...
nedo Posted June 6, 2014 Report Share Posted June 6, 2014 Cred ca cel mai simplu l-ai putea face in python, creezi un nested list, dupa care treci prin fiecare caracter si il verifici in lista, il inlocuiesti cu caracterul dat de tine. Quote Link to comment Share on other sites More sharing options...
far Posted June 6, 2014 Author Report Share Posted June 6, 2014 multumesc Quote Link to comment Share on other sites More sharing options...
Usr6 Posted June 6, 2014 Report Share Posted June 6, 2014 Un script simplu pentru "criptare", in python 2.7.dictionar = {"a": "1", "b": "2", "c": "3", "d": "4", "e": "5", "f": "6", "g": "7", "h": "8", "i": "9", "j": "~", "k": "!", "l": "@", "m": "#", "n": "$", "o": "%", "p": "^", "q": ":", "r": "&", "s": "*", "t": "+", "u": "=", "v": "|", "w": "_", "x": ".", "y": ",", "z": "0", " ": "`", "?":">"}text = "salut ce faci?"textcriptat = ""for i in text: if i in dictionar.keys(): textcriptat += dictionar else: print "n-am gasit inlocuitor pentru: " + str(i)print textcriptat Quote Link to comment Share on other sites More sharing options...