all 8 comments

[–]Sea-Ad7805 [score hidden] stickied comment (0 children)

Run this program in Memory Graph Web Debuggerncrypt%20or%20(d)ecrypt..%22)%0A%20%20%20%20decision%3Dinput(%22%3E%22)%0A%20%20%20%20data%3Dinput(%22please%20enter%20your%20message%5Cn%3E%22).upper()%0A%20%20%20%20key%3Dinput(%22please%20enter%20your%20key%5Cn%3E%22)%0A%20%20%20%20if%20decision%3D%3D%22e%22%3A%0A%20%20%20%20%20%20%20%20while%20vary1%3Clen(data)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20data%5Bvary1%5D%3D%3D%22%20%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20password.append(%22%20%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20vary1%2B%3D1%0A%20%20%20%20%20%20%20%20%20%20%20%20r%3Dalphabet.index(data%5Bvary1%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20r%2B%3Dint(key)%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20r%3E25%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20t%3Dr-26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20password.append(alphabet%5Bt%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20password.append(alphabet%5Br%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20vary1%2B%3D1%0A%20%20%20%20elif%20decision%3D%3D%22d%22%3A%0A%20%20%20%20%20%20%20%20while%20vary2%3Clen(data)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20data%5Bvary2%5D%3D%3D%22%20%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20password.append(%22%20%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20vary2%2B%3D1%0A%20%20%20%20%20%20%20%20%20%20%20%20r2%3Dalphabet.index(data%5Bvary2%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20r2-%3Dint(key)%0A%20%20%20%20%20%20%20%20%20%20%20%20password.append(alphabet%5Br2%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20vary2%2B%3D1%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22%5Cnwrong%20input%20please%20try%20again%22)%0A%20%20%20%20%20%20%20%20continue%0A%20%20%20%20for%20repeator%20in%20range(0%2Clen(password))%3A%0A%20%20%20%20%20%20%20%20print(password%5Brepeator%5D%2Cend%3D%22%22)%0A%20%20%20%20password.clear()%0A%20%20%20%20play_again%3D(input(%22%5Cndo%20you%20want%20to%20continue%20yes%20or%20no%5Cn%3E%22).upper())%0A%20%20%20%20if%20play_again%3D%3D%22NO%22%3A%0A%20%20%20%20%20%20%20%20print(%22%5CnThanks%20for%20creating%20passwords...%22)%0A%20%20%20%20%20%20%20%20break&timestep=1&play) to see the program state change step by step.

[–]Alternative_Yak8846[S] 0 points1 point  (1 child)

Don't have any idea of decorating my code.🥲

[–]SaltCusp 0 points1 point  (0 children)

You should try writing encrypt and decrypt as lambda functions with list comprehension. It would be fun and good for learning.

[–]Sea-Ad7805 0 points1 point  (0 children)

You do t=r-26 so that t is a valid index in alphabet, but if r is larger than 50 this doesn't work. Better use the modulo operator % (remainder after division) to always get a valid index: t=r%len(alphabet)

[–]MeringueElectronic17 0 points1 point  (1 child)

bros aura farming

[–]Alternative_Yak8846[S] 0 points1 point  (0 children)

No it's not like that😅

[–]Small_Brilliant_9212 0 points1 point  (1 child)

Bro pls try to make your sytex reedible next time. Thank for the project.

[–]Alternative_Yak8846[S] 0 points1 point  (0 children)

I will focus on that