1CPSC 111 Sample Final Exam Qs/AsExam Format:Final Exam will have around 30-35 Multiple Choice Qs (~50 pts]Show the expected output: ~10 ptsSHORT ANSWERS QUESTIONS (~10 pts)Programming Questions (~ 20 pts)Essay Qs (~10 pts):====================================================================THESE ARE NOT FINAL EXAM QUESTIONS TYPE. THESE ARE QUESTIONS TO HELPYOU PRACTICE ONLY.Practice with lists, strings, files: How to process them? How to slice them?Break, Continue,Conditional expression, try, except, recursion, decisions, aliasing,format operatoretc…Questions1. Complete the function below according to its specificationdef Question(s):""" Returns True if the characters at the start and end of s are different and occur nowhere else in sPreCondition: s is a string with length greater than or equal to 3."""Answer:def Question(s):""" Returns True if the characters at the start and end of s are different and occur nowhereelse in sPreCondition: s is a string with length greater than or equal to 3."""return s[0] != s[-1] and s.count(s[0]) == 1 and s.count(s[-1]) == 1word = input("Enter a string: ")print(Question(word))