Question: Write a python program that extracts a substring from the alphabet string based on the starting letter and the step. The step cannot be
Write a python program that extracts a substring from the alphabet string based on the starting letter and the step. The step cannot be zero. The starting letter can be entered as lowercase or upper case. You need to validate the input as shown in the sample runs. Hint:use find method to get the index of the entered letter. Sample run 1: Enter starting letter: th You must enter one letter Sample run 2: Enter starting letter: $ You must enter one letter Sample run 3: Enter starting letter: T Enter step: 0 Step cannot be 0 Sample run 4: Enter starting letter: M Enter step: 3 Resulting substring is: mpsvy Sanmple run 5: Enter starting letter: t Enter step: -3 Resulting substring is: tqnkheb (
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
Python import string alphabet stringasciilowercase Input for the star... View full answer
Get step-by-step solutions from verified subject matter experts
