Question: I have attached my code and out put here what do I have to change to get a space between encoded message. #File : translate.py
I have attached my code and out put here what do I have to change to get a space between encoded message.
#File : translate.py #date : 3/2/2021 #Aurthor : Dhruvil Patel #Purpose : Program to encrypt a sentence
def main():
print() print("Program to encrypt a sentence.") print("You will be asked to enter a sentence.") print("Written by Dhruvil Patel.") print()
text = input("Enter a sentence: ") print() print() print("Original sentence:",text) wordsB = "" for words in text.split(): wordsB = words[::-1].lower() + wordsB print("Encoded version: ",wordsB)
main()
>>> = RESTART: /Users/dhruvilpatel/Documents/cs125/projects/project 4/translate.py
Program to encrypt a sentence. You will be asked to enter a sentence. Written by Dhruvil Patel.
Enter a sentence: Hi hello
Original sentence: Hi hello Encoded version: ollehih >>>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
