Sabihah likes finding cyclic shifts of strings. A cyclic shift of a string is obtained by moving characters from the beginning of the string to the end of the string. We also consider a string to be a cyclic shift of itself. For example, the cyclic shifts of ABCDE are: ABCDE, BCDEA, CDEAB, DEABC, and EABCD.Design a Python program called "cyclicshift_firstname_lastname" that takes 2 words from the user. Your program must display "YES" if the first word contains a cyclic shift of the second word, other wise "NO".Sample Input/outputs:Enter a word: ABCCDEABAAEnter a 2nd word: ABCDEYour App must display "YES".Explanation:CDEAB is a cyclic shift of ABCDE and it is contained in the text ABCCDEABAA.Enter a word: ABCDDEBCABEnter a 2nd word: ABAYour App must display "NO".Explanation:The cyclic shifts of ABA are ABA, BAA, and AAB. N1 of these shifts are contained in the textABCDDEBCAB
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here