Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using python and for and while loop with if statements Write a program that extracts a substring from the alphabet string based on the starting
using python and for and while loop with if statements
Write a 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: Step cannot be 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: tqnkhebStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started