Question: Write a program that takes a string as an input ( 3 p ) , splits the string in half ( 8 p ) ,
Write a program that takes a string as an input p splits the string in half p puts it back together in
reverse order p and prints the result p If the string has an odd number of characters, then the
first "half" should be the shorter one. For example, "nowhere" should print "herenow". Name the file as
ppy and make sure to write your name as a comment and use comments to describe the statements
p
Hints:
You can use the len function to find the length of the input string.
You can use string sequences and indexes to reverse the input.
You can use as a concatenation operator to combine characters or strings.ppy and make sure to write your name as a comment and use comments to describe the statements
p
Hints:
You can use the len function to find the length of the input string.
You can use string sequences and indexes to reverse the input.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
