Python 3! Help with caesar cipher and for loop... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Python 3! Help with caesar cipher and for loop...

Okay so Ive started to get the hang of everyhting and Ive been successful at the tasks Ive set out for. But in order to continue programming my caesar cipher I need to get a for loop to print out a single string instead of a single character on each line or how can I get the changed characters to become a variable? Code is here: https://pastebin.com/UyJinsAk

23rd Oct 2017, 1:40 AM
Bubbles
Bubbles - avatar
1 Answer
+ 1
x = 'Hello' #string to encrypt for i in x: print(chr(ord(i) + 3),end="") add end="" at the end of o/p as above...
23rd Oct 2017, 4:41 PM
Prajwal Gowda
Prajwal Gowda - avatar