Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code is in python and is only asking for a function (no main). Please if possible upload a screen shot that is typed and indented

Code is in python and is only asking for a function (no main). Please if possible upload a screen shot that is typed and indented correctly if possible. Thank you image text in transcribed

start end letter Favorite E Show Header Language/Type: Author: Python String parameters inter Marty Stepp (on 2017/07/08) Write a function named start_end_letter that accepts a character (a one-letter string) as a parameter. The function repeatedly prompts the user to enter console input until the user types two consecutive words that both start and end with that letter for example, the word "shells" starts and ends with 's The function then prints a message showing the last word typed Your code should be case-insensitive for example, if the character passed is the lowercase 't', you should also consider it a match if the user types a word that starts and ends with an uppercase , T. If the user types a one-letter word, that word is considered to start and end with its single letter. For example, the word "A" starts and ends with 'a' The following log represents the console output from a call to your function. (User input is shown like this.) Your function should exactly match the output structure and behavior shown below when given similar input. start.end_letter's') Looking for two "s" words in a row Type a word: I Type a word love Type a word: CS Type a word: students Type a word: PROGRAMS Type a word: SCISSORS ype a word: melon Type a word: pens Type a word: Q Type a word: scores Type a word: SOS "s" is for"SOS" Assumptions: You may assume that the parameter value passed will be a lowercase letter from 'a' to 'z' inclusive. You may also assume that the user will type a valid single-word response to each prompt and that the word will contain at least one character (the user will not type a blank line) Constraints: You should not use any data structures such as arrays to help you solve this problem. You may declare as many simple variables such as ints or strings as you like Type your Python solution code here: 4 This is a function problem. Write a Python function as described. Do not write a complete program; just the function(s) above Sound F/X

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions