Why is this happening?? - Python | SoloLearn: Learn to code for FREE!


Why is this happening?? - Python


1/23/2021 4:20:11 PM


5 Answers

New Answer


Well, the problem were numbers in hashes, that is why it was buging. Thank for your help Abhay


At line 54, int(letter) isn't possible, so what are you trying to achieve with this? If you need ascii value of that letter then you need to use ord() function : ord(letter)


Why isn't it possible? Letter is variable. I don't need ascii value. There is an int so I can then index it, because with str it isn't possible.


BrinyFlyer28795 you can't convert a letter (say "A") to an integer, that's why the error is raised, so really it isn't possible and I was wondering if you need ascii value. To this hashes array you need to pass an index to get a particular letter but you are trying to do, hashes[int(letter say "A")] which i don't know how to interpret at all.


Ok, maybe variable letter should rather name string or character. All even indices in variable word will be numbers. So for example 1o3m4h1.8/[email protected] So, variable letter can be only number. There isn't a problem and there isn't an error. Problem is when i want do decrypt this: 5‑7q1H1H4*7q2|1H2|8g8g7q5‑5‑0R8g7q8g603>1H3>8g1H608g600R3>0R7q608g607q0R8g2|3>3>7q1H1H4*5‑600R60607q it shows bbbbbbbbbbbbbbbbbbb#bbbbbb(bb‑bbbbb(bb‘bbbbbbbbbbbb‑bb&b‘b but it should show bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb That's the problem.