Write a function rotate that takes in a string s and “rotates” the string to the right k times. Do not rotate the string if k is negative. Could you please help me I do not know how to do it.
Here is a small program that shows how to rotate a line of text. Now it's up to you to see how to create the function, and use this. Best of luck to you.