Answered step by step
Verified Expert Solution
Link Copied!

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, f-strings, 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 1938(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 1875 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
2
Then the output generated is:
B-A-bay
B-E-bee
B-I-bicky-bi
B-O bo
bicky-bi bo B-U 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 (e.g., the first letter in 'Bob'), or lower case (e.g., 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

Illustrate a scope of service.

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago