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!"
I Need To Begin With The Python Code Below
/in Uncategorized /by developerI 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.
I will also need the output from running my program.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Need To Below Questions Answered Asap Help 10 Read The Following Short Piece F
/in Uncategorized /by developerI 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!"
I Need To Calculate Adjustment Charitable Contribution For Corporation The Contr
/in Uncategorized /by developerI 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!"
I Need To Calculate The Molarity Of Bromothymol Blue Btb And I Can Only Use M1v1
/in Uncategorized /by developerI 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!"
I Need To Calculate The Percent Error Everytime I Try To Right Click In Excel Th
/in Uncategorized /by developerPlease 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!
I need the answer for the percent error =_______
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Need To Come Up With A Journal Article Need Ideas And Formulating Abstract Int
/in Uncategorized /by developerI 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!"
I Need To Complete 2 Papers For A School Counseling Program The Login To My Cour
/in Uncategorized /by developerI 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!"
I Need To Complete A Podcast On Race And Inequality In American Sports But I Am
/in Uncategorized /by developerI 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!"
I Need To Complete The Return On Shareholder S Equity Ratio As Well As The Retur
/in Uncategorized /by developerI 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!"
I Need To Complete This Task As Follows I Need The Project In Mla Format And For
/in Uncategorized /by developerI 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!"