Question: b Q1: Write a Python code to do the following: ( 7 marks) Handle the exception that could happen in this code: 6 marks word=input
Q1: Write a Python code to do the following: ( 7 marks) Handle the exception that could happen in this code: 6 marks word=input ("enter the a word") i=int (input ("enter the index ")) print ("the letter is :") print ( word[i]) - If the code doesn't raise any exception print ("It's OK") . 1mark ist of exceptions that you can use
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
