Start with the following Python code.   alphabet = “abcdefghijkl

Start with the following Python code.   alphabet = “abcdefghijklmnopqrstuvwxyz”    test_dups = [“zzz”,”dog”,”bookkeeper”,”subdermatoglyphic”,”subdermatoglyphics”]  test_miss = [“zzz”,”subdermatoglyphic”,”the quick brown fox jumps over the lazy dog”]  # From Section 11.2 of:  # Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press.  def histogram(s):      d = dict()      for c in s:           if c not in d:                d[c] = 1           else:                d[c] += 1      return d  Copy the code above into your program but write all the other code for this assignment yourself. Do not copy any code from another source.  Part 1  Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters. Otherwise, it should return False.   Implement has_duplicates by creating a histogram using the histogram function above. Do not use any of the implementations of has_duplicates that are given in your textbook. Instead, your implementation should use the counts in the histogram to decide if there are any duplicates.  Write a loop over the strings in the provided test_dups list. Print each string in the list and whether or not it has any duplicates based on the return value of has_duplicates for that string. For example, the output for “aaa” and “abc” would be the following.  aaa has duplicates abc has no duplicates  Print a line like one of the above for each of the strings in test_dups.  Part 2  Write a function called missing_letters that takes a string parameter and returns a new string with all the letters of the alphabet that are not in the argument string. The letters in the returned string should be in alphabetical order.  Your implementation should use a histogram from the histogram function. It should also use the global variable alphabet. It should use this global variable directly, not through an argument or a local copy. It should loop over the letters in alphabet to determine which are missing from the input parameter.  The function missing_letters should combine the list of missing letters into a string and return that string.  Write a loop over the strings in list test_miss and call missing_letters with each string. Print a line for each string listing the missing letters. For example, for the string “aaa”, the output should be the following.  aaa is missing letters bcdefghijklmnopqrstuvwxyz  If the string has all the letters in alphabet, the output should say it uses all the letters. For example, the output for the string alphabet itself would be the following.  abcdefghijklmnopqrstuvwxyz uses all the letters  Print a line like one of the above for each of the strings in test_miss.  Submit your Python program. It should include the following.  The provided code for alphabet, test_dups, test_miss, and histogram.  Your implementation of the has_duplicates function.  A loop that outputs duplicate information for each string in test_dups.  Your implementation of the missing_letters function.  A loop that outputs missing letters for each string in test_miss.  Also submit the output from running your program.  Your submission will be assessed using the following Aspects. Does the program include a function called has_duplicates that takes a string parameter and returns a boolean? Does the has_duplicates function call the histogram function?  Does the program include a loop over the strings in test_dups that calls has_duplicate on each string?  Does the program correctly identify whether each string in test_dups has duplicates?  Does the program include a function called missing_letters that takes a string parameter and returns a string?  Does the missing_letters function call the histogram function? Does the missing_letters function use the alphabet global variable directly? Does the program include a loop over the strings in test_miss that calls missing_letters on each string? Does the program correctly identify the missing letters for each string in test_miss, including each string that “uses all the letters”?

Struggling to find relevant content? Order a custom essay on
Start with the following Python code.   alphabet = “abcdefghijkl
Let our experts save you the hassle
Order Now
Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
Sign up, place your order, and leave the rest to our professional paper writers in less than 2 minutes.
step 1
Upload assignment instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
s
Get personalized services with GPA Fix
One writer for all your papers
You can select one writer for all your papers. This option enhances the consistency in the quality of your assignments. Select your preferred writer from the list of writers who have handledf your previous assignments
Same paper from different writers
Are you ordering the same assignment for a friend? You can get the same paper from different writers. The goal is to produce 100% unique and original papers
Copy of sources used
Our homework writers will provide you with copies of sources used on your request. Just add the option when plaing your order
What our partners say about us
We appreciate every review and are always looking for ways to grow. See what other students think about our do my paper service.
IT, Web
Don did an excellent job!!!
Customer 452885, January 25th, 2023
Social Work and Human Services
Excellent Work
Customer 452587, November 22nd, 2021
Social Work and Human Services
Great Work!
Customer 452587, September 8th, 2021
Social Work and Human Services
Awesome, Work! Didn't have to add much to it. Thank You!
Customer 452587, September 7th, 2021
Social Work and Human Services
Thank You! Great Work!
Customer 452587, September 14th, 2021
Nursing
Great work. Will definitely recommend
Customer 452523, May 15th, 2021
Nursing
Thank you to the writer and also thank you to the support team I got an A for the paper
Customer 452635, June 17th, 2022
Medicine
This has everything that was in the rubric. Thank you!
Customer 452707, May 29th, 2022
Social Work and Human Services
Perfect. Thank you.
Customer 452469, July 10th, 2021
Nursing
Always perfect!!! Don is the best!
Customer 452453, July 27th, 2021
Nursing
Thank you!
Customer 452707, June 29th, 2022
Other
great
Customer 452813, June 30th, 2022
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
error: Content is protected !!

Save More. Score Better. Use coupon code SPECIAL for a 15%discount