Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please read the instructions and the problem statement. Ensure that the names for file/variables/functions are related to the problem statement and not vague. Include a

Please read the instructions and the problem statement.

Ensure that the names for file/variables/functions are related to the problem statement and not vague.

Include a docstring for each function. The docstrings must be placed below the function header. Use multiline comment style """description""" (See classroom examples)

Add comments if you think that a section of your script needs any explanation. Do not over comment as it becomes unreadable.

Test your scripts for acceptable values as specified in each question before submitting.

If you are resubmitting your assignment, please resubmit all the files needed for this assignment

2. Create a python program called keyboard_letter_row.

Create a function called input_words where the user inputs words that are added to a list of strings. The list must contain at least 1 string.

All string values input must contain only letters of the alphabet.

Include exception handling in this function

Return the list to main

Create a function called find_row. This function should return a list of words that can be typed using one row of the QWERTY keyboard like the image included below.

In the QWERTY keyboard:

the first row consists of the characters "qwertyuiop",

the second row consists of the characters "asdfghjkl", and

the third row consists of the characters "zxcvbnm".

You can convert the input string to all lower case or all upper case for ease of processing.

Return the list of words that can be typed using one row back to main

Create a main function that:

calls the input_words function and captures the returned list

Calls the find_row function and passes in the list. The returned list is captured and displayed

Example:

input words: ['Hello', 'Alaska', 'Mom', 'Peace']

output: ['Alaska']

input words: ['shall', 'going', 'worry']

output: ['shall', 'worry']

input words: ['flame']

output: []

File to be submitted: .py

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_2

Step: 3

blur-text-image_step3

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

More Books

Students also viewed these Databases questions

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago