I Need To Begin With The Python Code Below

I need help with an assignment. I need to begin with the Python code below:.   

alphabet = “abcdefghijklmnopqrstuvwxyz”   

test_dups = [“zzz”,”dog”,”bookkeeper”,”subdermatoglyphic”,”subdermatoglyphics”] 

test_miss = [“zzz”,”subdermatoglyphic”,”the quick brown fox jumps over the lazy dog”] 

def histogram(s):

   d = dict()

   for c in s:

     if c not in d:

        d[c] = 1

     else:

        d[c] += 1

   return d 

I need to make 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.  

Then I need to implement has_duplicates by creating a histogram using the histogram function above.My implementation should use the counts in the histogram to decide if there are any duplicates. 

I need to make a loop over the strings in the provided test_dups list. Then I need to print each string in the list and whether or not it has any duplicates based on the return value of has_duplicatesfor that string. For example, the output for “aaa” and “abc” would be the following. 

aaa has duplicates

abc has no duplicates 

At last, I need to print a line like one of the above for each of the strings in test_dups. 

Part 2 

I need to make 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. 

My 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. 

I need to make a loop over the strings in list test_miss and call missing_letters with each string. Then I must 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 

I need to print a line like one of the above for each of the strings in test_miss. 

Can you please 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. 

I will also need the output from running my program. 

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Below Questions Answered Asap Help 10 Read The Following Short Piece F

I need to below questions answered asap. Help!1. (10) Read the following short piece from The Economist: http://goo.gl/YKeJtB which discusses and explains doctor pay. In it they note that “a doctor of general medicine in New York typically earns 64% less than a peer in Alabama.” This is despite the fact that there is a significantly higher demand for general medicine in New York compared to Alabama. Use a market supply and demand for general medicine practitioners in both New York and Alabama to depict this situation. Use one set of axes and show separate supply and demand curves for medicine practitioners in New York and Alabama. Your diagram should depict that the demand is higher in New York, but that the salary of general medicine practitioners (the price for labor) is higher in Alabama.2. (20) Amazon recently had a very public dispute with the book publisher Hachette regarding its prices for e-books. Amazon was trying convince Hachette to lower their price for e-books, arguing that doing so would benefit both consumers and the publisher; Hachette was refusing to cut their prices, countering that lower prices would hurt both the publisher and its authors. Amazon explained their objectives in terms of price elasticity on the following discussion board: http://goo.gl/9lEcMW Read the full post then answer the following questions.a.) Amazon states that “For every copy an e-book would sell at $14.99, it would sell 1.74 copies if priced at $9.99.” Use this information to calculate the price elasticity of demand for e-books between these two prices. Show your work.b.) Suppose Amazon was selling 2,000,000 Hachette e-books when the price was $14.99. If their above calculations are correct, how many would they sell after the price is cut to $9.99? What would the total revenue from e-books equal before and after the price cut?c.) Amazon claims that “e-books are highly price elastic.” If this is the case, then why wouldn’t Amazon want to cut prices even further? For example, why not cut the price of e-books to $0.99 instead of $9.99? d.) Given that Amazon is arguing that cutting e-book prices to $9.99 would benefit Hachette through higher revenue, why do you think Hachette was against this price cut? It is obvious that Hachette did not agree that this move would have benefited them; otherwise they would have voluntarily cut prices. Briefly explain why Hachette may still be against the price cut, even if Hachette does not dispute any of the estimates Amazon gives regarding the price elasticity of demand or revenue expectations. In other words, they believe everything Amazon says in the blog is completely accurate, but they’re still against cutting prices because…3. (10) Read the following interview with John Mackey, CEO of Whole Foods: http://goo.gl/KLPBRJ Mackey talks about the “paradox of shareholder value” and criticizes the theory that purports that all firms should maximize profits. He says that the way he runs Whole Foods is not with profit maximization but with customer satisfaction as its primary purpose. Given Mackey’s point of view, do you think economists should change the way they view firm behavior? In other words, do you think it’s accurate to assume that firms make decisions with profit maximization as its primary purpose, even though the CEO of a large successful corporation is stating that he considers something other than profits as his firm’s primary purpose when making decisions? Explain your answer, and refer to the interview where appropriate.4. Suppose a new firm has fixed start-up costs equal to $2,000,000. Their marginal costs are constant at $20/unit, so their total costs are equal to: $2,000,000 + $20Q.a.) (3) Calculate their average total costs at the following quantities_Q=10,000Q=100,000Q=500,000b.) (4) On a clearly labeled set of axes graph out their MC and ATC curve for the quantities listed above. Be sure that the amounts are clearly indicated on both axes.c.) (5) Suppose this product is sold at a constant price of $25/unit. How many units does this firm have to sell before it becomes profitable?d.) (5) Suppose a potential competitor is considering entering this market. If they enter, this competitor would also incur start-up costs equal to $2,000,000 and expects to sell 200,000 units/year. Should this competitor enter the market? Briefly explain what factors this decision would depend on. 5. Read the following article from The Economist: http://goo.gl/F37srt then answer the following questions. a.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Calculate Adjustment Charitable Contribution For Corporation The Contr

I need to calculate adjustment charitable contribution for corporation. The contribution paid in cash.

                                                             debit                             credit

net sales                                                                              3,750,000

dividends                                                                              29,000

Interest                                                                                  12,000

Gain on sale of stock                                                             35,000

Key-person Life ins.proc                                                            110,000

GOS                                              2,150,000

Salaries & wages                               460,000

Bad debts                                        16,000

Payroll Taxes                                    90,000

Interest expense                                  22,000

Charitable contribution                       130,000

Depreciation                                       55,000

Other expenses                                 50,000

Federal income taxes                         272,782

Net income /Taxable income

before special deductions                    690,218

Total                                                 3,936,000                            3,936,000

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Calculate The Molarity Of Bromothymol Blue Btb And I Can Only Use M1v1

I need to calculate the molarity of Bromothymol Blue (BTB), and I can only use M1V1 = M2V2. I did a dilution, using a pH 8.0 Phosphate Buffer. Before dilution, the molarity of BTB is 23.2 µM. 

Volume of BTB = 0.025 L Volume of Phospahte Buffer = 0.005 L

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Calculate The Percent Error Everytime I Try To Right Click In Excel Th

Please help me plot this data in excel. I need to calculate the percent error…I need help as soon as possible. Everytime I try to right click in Excel the data will not work. Thank you!

  1.    Open Excel
  2. Start a new workbook in EXCEL.
  3.           Enter the following experimental data:
  4.                   For row A1 enter “x”.
  5.                   In row A2 enter “0.110”.
  6.                In row A3 enter “0.125”.
  7.                 In row A4 enter “0.150”.
  8.                In row A5 enter “0.210”.
  9.                   In row B1 enter “y”.
  10.                   In row B2 enter “1.08”.
  11.                In row B3 enter “1.32”.
  12.                 In row B4 enter “1.58”.
  13.                In row B5 enter “2.04”.
  14.            Finish entering data.
  15. The next part is to graph the data and then complete a curve fit which we will skip. The curve fit will give the equation y = 9.23x + 0.13. Use this equation to calculate the predicted y or yfit.
  16.            In row C1 enter “y fit”.
  17.            In row C2 enter “= 9.23*A2 + 0.13”.
  18.            Click to select row C2. Then left click twice on the lower right corner of C2. This will calculate for row C3 – C5.
  19. Now calculate the square of the error
  20.       In row D1 enter “Error squared”
  21.            In row D2 enter “= (B2 – C2)^2”.
  22.            Click to select row D2. Left click the lower right corner twice to repeat the calculation for rows D3 – D5.
  23. Now calculate the root mean square error.
  24.           In row D6 enter ” = sqrt( Average(D2:D5) )”.
  25.           When this is done you should have a value of 0.0516 in row D6. This is the rms error.
  26. To calculate the percent error of the fit, calculate the average of the |y|.
  27.           In row E1 enter “Abs(y)”
  28.           In row E2 enter ” = abs(B2)”.
  29.           Click to select row E2. Left click twice on the lower right corner of E2 to calculate for row E3 – E5.
  30.         In row E6 enter ” = Average(E2:E5)”.
  31. You should have a value of 1.505 in row E6.
  32. Now calculate the percent error
  33.      In row F1 enter “Percent error —>”
  34.          In row G1 enter ” = D6/E6*100″.
  35. Now repeat with a new set of data and answer the question below.
  36. Question: Enter the experimental data below into an EXCEL workbook.
  37.        Height difference    Acceleration
  38.                0.110           1.05
  39.                   0.125           1.34
  40.                 0.150           1.54
  41.                   0.210           2.10
  42. The equation of the best-fit line is y = 9.97x + 0.02. What is the percent error of the fit? Use 3 decimal places.

I need the answer for the percent error =_______

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Come Up With A Journal Article Need Ideas And Formulating Abstract Int

I need to come up with a journal article. Need ideas and formulating abstract, introduction and method.

The layout and format of the paper should include the following sections:

Title , Abstract, Introduction, Method, Results, and Discussion.

Abstract 

Introduction

Empirical Results 

Method 

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Complete 2 Papers For A School Counseling Program The Login To My Cour

I need to complete 2 papers for a school counseling program. The login to my course can be given to retrieve additional information and resources to complete the writing assignments.

Please see attached document for details related to the papers. 

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Complete A Podcast On Race And Inequality In American Sports But I Am

I need to complete a podcast on race and inequality in american sports but i am unsure how to do so. Can someone talk about race and inequality in American sports? How it was decades ago and how it is still an issue today.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Complete The Return On Shareholder S Equity Ratio As Well As The Retur

I need to complete the return on shareholder’s equity ratio as well as the return on net assets ratio. I don’t know what numbers I need to take to complete the ratios from this attached income statement.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

I Need To Complete This Task As Follows I Need The Project In Mla Format And For

I need to complete this task as follows.

I need the project in MLA format and for each sheet a different photo with the questions I give at the power point.

1You have to find three different images with the Art Movements that I offer you in the power point.

2 Has to answer the additional questions that follow the power point in paragraph {in MLA format} and explain why in each and in question 7 give a personal answer of why.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW