Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Description The program in main.py contains a variable (of type list) called list_of_names that has a list of 500 names. The given program prints

image text in transcribed

Project Description The program in main.py contains a variable (of type list) called list_of_names that has a list of 500 names. The given program prints a count of names from the list that meets both these conditions: (a) has the letter 'H' in it, and (b) has more than 6 characters. Modify the program such that it prints the following number: A+B Where: A= count of names, from the given list, that has at least one of the letters from your unique 7 letter word. B= count of names, from the given list, where the name's last letter is one of the letters of your unique 7 letter word. Please keep in mind, your program should print a single numeric value To get the maximum score, do not print any other extra output HINT: In Python, the statement: ' X ' in 'EXAM' returnsTrue because the string ' X ' is contained inside of the string 'EXAM'. HINT: A string can be indexed just like a list. Thus, if my_cats_name = 'JIMMY', then my_cats_name[-1] will return the last letter (' Y ')

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

identify current issues relating to equal pay in organisations

Answered: 1 week ago