Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use python to complete pls ! ! ! I am really lost In this lab we are going to use some basic string functionality, such
Use python to complete pls I am really lost
In this lab we are going to use some basic string functionality, such as indexing, fstrings, and concatenation to to write a stanza from the song Swingin' the Alphabet'. Haven't heard of it According to Wikipedia, it was in a short movie back in when swing music was more popular and sung by the trio Moe Howard, Larry Fine, and Curly Howard, but was actually composed by Septimus Winner back in as "The Spelling Bee". There is a stanza for each letter of the alphabet except the vowels
The goal in this lab is to write a program that takes two inputs and generates a stanza from the song for the letter in the name at the index provided in the second input.
A common name, such as "Bian"
A position index in the string that identifies the letter for the stanza.
Example:
If the input is:
Bob
Then the output generated is:
BAbay
BEbee
BIbickybi
BO bo
bickybi bo BU bu
bicky bi bo bu
Note: The letters that change in each stanza are bolded to clarify. Your answer does not involve bolding.
Hint: The letter at the given index could be either upper case eg the first letter in 'Bob' or lower case eg the last letter in 'Bob' In the output you generate, sometimes the letter that changes the bold letters in the example are upper case, and sometimes they are lower case. You may want to create two variables that you then use in your print statements.
Since we have not covered branching or error handling, for grading assume that the index could be positive or negative, but would never reference a position that is not in the string.
Step 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