Given the following code: z = input(‘Enter your name: ’).tit…