Could this code had been done in a shorter method | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Could this code had been done in a shorter method

Code of secret message in code coach https://code.sololearn.com/cAG1niLGGGCW/?ref=app

28th Aug 2020, 7:40 AM
Smiley[Offline]
2 Answers
+ 2
w="" for i in input(): n=ord(i) l=n-65 if i==" ": w=w+" " elif n>90: m=n-32-65 w=w+chr(90-m) else: w=w+chr(90-l) print(w.lower()) this is my code and there might be a better code than this.
28th Aug 2020, 7:48 AM
Ajith
Ajith - avatar
+ 1
Ajith thanks
28th Aug 2020, 8:04 AM
Smiley[Offline]