Can someone help me out with my code. The requirements and results of the code and the code I have written so far and what my my code runs is down.
REQUIREMENT
The transposition cipher can be generalized to any number of rails. Write a function to
implement a three-rail fence cipher that takes every third character and puts it on one of the three rails. Create main function and test the above function with two sample input as shown below. Create main function that prompts the user for a message and prints the plainText and encrypted messages.
RESULT OF CODE
Enter a message: ABCDEFGHI
PlainText: ABCDEFGHI
CipherText: CFIBEHADG
Enter a message JACK IN THE BOX
PlainText: JACK IN THE BOX
CipherText: CIT XA EOJKNHB

MY CODE
def encryption(plainText):
evenChars = " "
oddChars = " "
charCount = 0
for ch in plainText:
if charCount % 3 ==0:
evenChars = evenChars + ch
else:
oddChars = oddChars +ch
charCount = charCount + 1
cipherText = oddChars + evenChars
return cipherText

def main():
plainText = input("Enter Message : ")
cipherText = encryption(plainText)
print("Encrypted Message : ", cipherText)

main()

MY CODE RUNS:
Enter Message : JACK IN THE BOX
Encrypted ,essage : J