Questions
In Python write a program that prompts the user for a file name, make sure the...

In Python write a program that prompts the user for a file name, make sure the file exists and if it does reads through the file, count the number of times each word appears and then output the word count in a sorted order from high to low.

The program should:

  • Display a message stating its goal
  • Prompt the user to enter a file name
  • Check that the file can be opened and if not ask the user to try again (hint: use the try/except structure)
  • Count the number of times each word appears in the file, regardless if in lowercase or uppercase (hint: use dictionaries and the lower() function)
  • Display the word count in order from high to low
  • If a few words have the same count, sort the display in an alphabetic order
  • For example, for the attached file NYT2.txt, the top five words in the output should be

the - 7

in - 6

to - 5

and - 4

of - 4

Remember:

  • DO NOT use more advanced functions than needed.
  • Make sure to include comments that explain all your steps (starts with #).
  • Run the program a few times to make sure it executes and meets all the requirements.

NYT2.txt file below:

Fact-Checking Trump’s Orlando Rally: Russia, the Wall and Tax Cuts
President Trump delivered remarks in Florida in a formal start to his re-election effort.
Deutsche Bank Faces Criminal Investigation for Potential Money-Laundering Lapses        
Federal authorities are focused on whether the bank complied with anti-money-laundering laws, including in its review of transactions linked to Jared Kushner.
Five NY1 Anchorwomen Sue Cable Channel for Age and Gender Discrimination
The women, including Roma Torre, say their careers were derailed after Charter Communications bought New York’s hometown news station in 2016.
Hypersonic Missiles Are Unstoppable. And They’re Starting a New Global Arms Race.
The new weapons — which could travel at more than 15 times the speed of sound with terrifying accuracy — threaten to change the nature of warfare.
Nxivm’s Keith Raniere Convicted in Trial Exposing Sex Cult’s Inner Workings
Mr. Raniere set up a harem of sexual ā€œslavesā€ who were branded with his initials and kept in line by blackmail.
Jamal Khashoggi Was My FiancƩ. His Killers Are Roaming Free.
Washington hasn’t done enough to bring the murdered Saudi columnist’s killers to justice.

In: Computer Science

GRAMMAR: Subject-Verb Agreement in the Simple Present INSTRUCTIONS: Complete each sentence with the correct verb. 11....

GRAMMAR: Subject-Verb Agreement in the Simple Present

INSTRUCTIONS: Complete each sentence with the correct verb.

11. Everyone who ________________ (attend / attends) the concert will receive a t-shirt and poster.

12. The U.S. Olympic ice hockey team ________________ (practice / practices) in Colorado.

13. All the drinking water in New York City ________________ (come / comes) from the mountains more than a hundred miles away.

14. One of the most obvious causes of car accidents ________________ (is / are) drivers who use their phones while driving.

15. Living in a big city ________________ (cost / costs) more money than living in a small town.

GRAMMAR: Word Forms

INSTRUCTIONS: Complete each sentence with the correct word form.

16. Scientists were quick to understand the ________________ (important / importance) of the new discovery.

17. Choosing a major in college can be a difficult ________________ (decide / decision) to make.

18. Effective teachers plan ________________ (creative / creatively) lessons for their students.

19. Stress can have a negative effect on a person’s ________________ (mental / mentally) health.

20. The ________________ (recommend / recommendation) of some experts is to avoid checking email throughout the day.

INSTRUCTIONS: Choose the correct word to complete each sentence.

____ 21. A(n) ________________ advantage of this program is that it can be used on mobile devices.

a. doubtful b. additional c. abandoned

____ 22. Although a university degree cannot ________________ a great job, graduates do tend to receive higher salaries than those without a degree.

a. be related to b. shrink c. guarantee

____ 23. Races that are 10,000 kilometers or longer test the ________________ of the athletes.

a. impact b. strategy c. endurance

____ 24. Sitting still for long periods of time can be a ________________ challenging task for young learners.

a. dilemma b. mentally c. particularly

INSTRUCTIONS: Choose the correct word form to complete each sentence.

25. Families often build an ________________ (addition / add / additional / additionally) to their house as they have more children and need more space.

26. Modern medicine has made it unnecessary for people to ________________ (endure / endurance / enduring) the terrible pain that often accompanies diseases such as cancer.

27. When learning a new language, it is best to ________________ (interaction / interact / interactive / interactively) with native speakers as often as possible.

28. Strong ________________ (motivation / motivate / motivational) can be a powerful tool in reaching one’s goals.

29. The sales department’s ________________ (strategy / strategize / strategic / strategically) for increasing sales has been extremely successful.

In: Operations Management

Allowing customers to receive goods and services now and pay for these latter is another use of the word Credit.


Allowing customers to receive goods and services now and pay for these latter is another use of the word Credit. Discuss why a company would provide goods and services now and allow someone to pay latter. What factors should a company consider when allowing a customer to postpone payment? When should a company consider that some customers are not going to honor their debt? How does the realization that some customers are not going to pay impact the operations of the company? Provide supportive statements for which method of accounting for Bad Debts is more appropriate under various situations.

In: Finance

Draw the stack (use, word/pdf) before every instruction that is marked red is executed to show...

Draw the stack (use, word/pdf) before every instruction that is marked red is executed to show your understanding of the call and return functions.   Use N/A to represent unpredictable values.

            
            Main Proc
            4040018          mov ecx, 0000000Ch
            404001C          mov ebx, 0000000Bh
            4040020          call FADD
            4040026          mov eax, ebx
                      …
                      …                    

            Main EndP

            FADD  PROC
            4041040          Push ecx
            4041044          Push ebx
            4041048          mov eax, edx
                      …
                      …
            404A060         Pop ebx
            404A062         Pop ecx
            404A064         ret
            FADD EndP

In: Computer Science

Part 1 Write a 3,000 word paper explaining the key sources of information and data required...

Part 1 Write a 3,000 word paper explaining the key sources of information and data required to calculate taxable income when preparing tax documentation for individuals and outline the key accounting principles and practices relevant to the preparation of taxation documentation. In the paper consider and describe: consultation with clients use of expert or specialist advice when necessary the rules and principles of Australian tax law the legislation, regulations and organisational policies and procedures that must be adhered to ethical issues relevant to the preparation of tax documentation for individual taxpayers concepts and acceptability requirements relating to income, assets, deductions, tax rebates and offsets -that is, what should be included different forms of taxation procedures and timeframes for completing, recording and submitting document

In: Accounting

Using Word, please complete the 2 requirements below: In January (its first year of existence) of...

Using Word, please complete the 2 requirements below:

In January (its first year of existence) of 2017 ABC Corp issued 100,000 shares of 1.00 par stock for $1,750,000. ABC issued 10 year $200,000 bonds at 95 with a stated rate of 9%; and 20 year $400,000 at 105 with a stated rate of 9%. Amortized using the straight-line method. Both pay interest semi-annually.   ABC lastly issued 5% 5-year convertible debt for $105,000, par was 100,000. Interest paid annual on 1/1. Amortizable using SL method. The debt is convertible into 5,000 shares of stock.

On July 1, 2017, getting ready for internet launch of new product - ABC Company issued 10 year $500,000 10% bonds at 98. The market rate of interest is 10.5%. The interest is paid annually on 12/31. ABC uses the effective interest rate method for amortization. Note that the 10% stated rate is an annual rate.

On 8/1 ABC issued 10,000 shares of $10 par value preferred stock for $12/share.

During the year, the sales of widgets skyrocketed. ABC had $3,500,000 in credit sales for inventory   The inventory, which cost $1,500,000 (all purchased with credit) was all sold. No inventory remains.   We will pay the supplier in Jan 2018.   

Due to unbelievable sales the company determined to buy back bonds. On September first they purchased all of the outstanding $200,000 debt for $195,000 cash.

ABC had the following cash transactions: Paid salaries of $100,000, rent of $30,000. Paid for insurance used during the year of $20,000. Had miscellaneous operating expenses of $5,000.   On 12/31 it bought machinery for $10,000 in cash. On 12/31 it bought 1,000 of its common shares back at a price of $10/share.

On 12/15 ABC declared $10,000 cash dividends. The actual payment will not be made until next year.

On 12/31 all of the convertible debt is converted into common stock.

All Journal Entries (including adjusting and closing entries)

Prepare Income Statement in good form and complete

Prepare Balance Sheet in good form and complete

In: Accounting

Do the assignment in R/RStudio. Copy or compile your results into Word, write any explanations and...

Do the assignment in R/RStudio. Copy or compile your results into Word, write any explanations and turn in the hard copy.

You conduct a survey of New Yorkers. The survey uses a stratified sample of 100 employed college graduates and 100 employed high school graduates. Your survey concludes that 70% of college graduates are happy with their job compared to only 60% of high school graduates.

a. What is the standard error and margin of error of the estimate for college graduates?

b. What is the standard error and margin of error of the estimate for high school graduates?

c. What is the standard error and margin of error for the ten percentage point difference between the two groups?

d. I claim that the two groups are similar (the basic economic model of work/leisure implies nobody really likes working!). Can you reject this hypothesis?

In: Statistics and Probability

On a new Word document, write 4 - 5 paragraphs describing how you want to organize...

On a new Word document, write 4 - 5 paragraphs describing how you want to organize your assisted living facility business and how management will be structured. Your paragraphs should include the following:

  • A brief overview of the type of organization structure you will have (as each health care facility is structured differently, whether a hospital, private practice or department)
  • A list of the major positions within your health care organization and their responsibilities.
  • A description of the type of advisory board or board of directors you will have. Explain the roles of those involved in this panel of experts.
  • An explanation of why you set your organization up this way.

In: Nursing

For questions (16) through (25) you write correct word for the blank space According to Hotellings...

For questions (16) through (25) you write correct word for the blank space

According to Hotellings Paradox, an industry with a small number of sellers with large market shares will often end up offering products that are highly (16)_______

and are aimed at the (17)_______of the market.

When firms in an oligopoly have a tacit agreement to "follow the leader" in raising prices, iit is called (18) __________

Oligopolies often have a demand curve that is (19)__________above the present price because if they (20)______their prices, their rivals will NOT match them.

Their demand curve is (21)_________ below the present price because if they (22)____    their prices the rival firms WILL do the same thing.

23) Under Monopolistic Competition, firms will produce with _______capacity in the long run.

24) Firms in an Oligopoly usually have very ________start up costs for advertising and marketing.

25) The type of industry where firms produce ā€œdifferentiatedā€ products is an ________________

In: Economics

Late in the year, Software City began carrying WordCrafter, a new word processing software program. At...

Late in the year, Software City began carrying WordCrafter, a new word processing software program. At December 31, Software City’s perpetual inventory records included the following cost layers in its inventory of WordCrafter programs.

Purchase Date Quantity Unit Cost Total Cost
Nov. 14 10 $ 410 $ 4,100
Dec. 12 24 $ 330 7,920
Total available for sale at Dec. 31 34 $ 12,020

a. At December 31, Software City takes a physical inventory and finds that all 34 units of WordCrafter are on hand. However, the current replacement cost (wholesale price) of this product is only $250 per unit.

1. Prepare the entries to record this write-down of the inventory to the lower-of-cost-or-market at December 31. (Company policy is to charge LCM adjustments of less than $2,000 to Cost of Goods Sold and larger amounts to a separate loss account.)

2. Prepare the entries to record the cash sale of 28 WordCrafter programs on January 9, at a retail price of $310 each. Assume that Software City uses the FIFO flow assumption.

b. Now assume that the current replacement cost of the WordCrafter programs is $370 each. A physical inventory finds only 32 of these programs on hand at December 31. (For this part, return to the original information and ignore what you did in part a.)

1. Prepare the journal entry to record the shrinkage loss assuming that Software City uses the FIFO flow assumption.

2. Prepare the journal entry to record the shrinkage loss assuming that Software City uses the LIFO flow assumption.

In: Accounting