Question 1: Down Pat A pat is a single letter or a string of letters which can be split into a left and right string (of at least 1 letter) where:...
This question has been answered
Question

Could you please help me with this computer science Question. I need the program completed in Python. Could you help me? I am quite new to Python and I need to help with this program within 1 hour so urgent help is required please. Thanks in advance.


Screenshot 2021-01-13 at 12.18.25.png

Image transcriptions

Question 1: Down Pat A pat is a single letter or a string of letters which can be split into a left and right string (of at least 1 letter) where: each is the reverse of a pat; and all the letters in the left string are later in the alphabet than all the letters in the right string. For example: - BA is a pat as it splits into B and A, both of which are single letters and therefore pats, and B is alphabetically after A. AB is not a pat as the alphabetical rule would be broken; ' Similarly ED is a pat but DE is not; - DEC is a pat as it splits into DE (whose reverse ED is a pat] and C. - CEDAB splits into GED and AB, whose reverses are pats and C, E, and D are after A and B alphabetically. 1(a) [24 marks] Write a program that reads in two strings from a line, 51 then 52, each between 1 and Sampfe run 6 uppercase letters inclusive. DE C You should output three lines, each containing a YES or NO indicating, in order, ifs; no . . . . . . . YES Is a pat, If 52 Is a pat, and Ifs:52 (the combination of the two words) Is a pat. YES You must get all three lines of output correct to score marks. 1(b) [3 marks] Which permutations of ABCD are pats? 1(a) [5 marks] How many permutations of the alphabet, beginning with the letter B, are pats?

Answered by Expert Tutors

a. Fu

molestie cons

riguepulv, ultricc

ipiscing elit. Nautesque dapibus efficiturfec facilisis. Pellentesque dapibuor neguenecentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna.iconec aliqfusce dui l0dictumsu, consectetur adipiscing elit. Nam lacinia pulvinar tor0tricesfac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sfongue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsurem ipsum dolor sit amet, consectetur adipiscing elit. Nam lsuacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus antesumolestiefsus ante, dapibus a molestie consequat, ultrices ac magitm risus anfitur laoreet. Nam risus ante, dapibicsque dapibusfng elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat,icsque dapibusfDonec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestieuipsum dolor sit amet,acie vel laoreet ac, dictumacior nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibuor neguenec, consectetur adipior neguefficiniauur laoreet. Nam risusa molestiesus ante, dapibus a molestie consequae vel laoreet ac, dictum vitaesus ante, dapibus a molestie consequat, ultec facmolestie consequat, ultrices ac mag0ipsum dolor sit amet, consectetur aflestie consequat,uamet, consectetur adipiscing elit. Nam lacinia pulvinipiscinggue vel laorlestie consequat,e vel laoreet ac,onecitur laoreet. Nam risus ante, dapibus aipiscinggue vel laorlestie consequaet, consectetur adipiscing elit. Nauipiscing elit. Nam lacinia pulvinar tortor nec faciliipiscingm ipsum dololestie consequat,e vel laoreet ac,onecitur laoreet. Nam risus ante, dapibus aipiscingm ipsum dololestie consequaongue vel laoreet aulestie consequat, ultrices ac magna. Fusce dui lectus, congue veipiscinga molestie consequat,lestie consequat,e vel laoreet ac,onecitur laoreet. Nam risus ante, dapibus aipiscinga molestie consequat,lestie consequax


a. Fu

ng elit. Nam,consectetur adipiscing eenta. Fusce dui lametam


Donec

s a molestie consequat, ultrices ac magna. Fusce du

fficitur laoreet. Nam risus ante,

molestie coipiscing elit. Nam lacinia pulvinar tortor nec fam rifa. Fusce duiongue vel laoreet am rif, consectetung elit. Nam lacinim ri,entesque dapdictum vitae odio.susuitur laoreece dui l



nec facilisis. Pellentesque dapibus eff

ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapib

Step-by-step explanation

tesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac ma


ac, di

trices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesqu
The student who asked this found it Helpful
Overall rating 100%
Get unstuck

487,593 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses