Questions
PYTHON. Tasks: Create and test the openFileReadRobust() function to open file (for reading) whose name is...

PYTHON.

Tasks:

  1. Create and test the openFileReadRobust() function to open file (for reading) whose name is provided from the standard input (keyboard) – the name is requested until it is correct
  2. Create and test the openFileWriteRobust () function to open file (for writing) whose name is provided from the standard input (keyboard) – the name is requested until is correct
  3. Extend the program to count number of characters, words and lines in a file as discussed in the classby including openFileReadRobust() and openFileWriteRobust () functions
  4. Create simple tallying program to input sequence of integers (each integer 0-100) from a file (name to be entered from the keyboard using openFileReadRobust() function), compute the tally sheet discarding all bad data. Display the discarded bad data on the screen.
  5. Write the content of the tally sheet (write only non-zero counts of numbers – numbers that are in the input file) to a standard output (the shell window).
  6. Extend the program to write the content of the tally sheet (write only non-zero counts of numbers – numbers that are in the input file) to a file (name to be entered from the keyboard). Display the content of the file on the screen.

Assume the content of the file myData1.txt:

5

100

111

OK

55

5

55

5

The interaction of your program should be displayed in the Shell window similarly as shown below:

Task 1

What is the input file name?

myData.txt

This file cannot be opened

What is the input file name?

myData1.txt

Task 2

What is the output file name?

myResults1.txt

Task 3

The number of characters is: 15

The number of words is: 8

The number of lines is: 8

Task 4

Discarded bad data: 111, OK

Task 5

The tally sheet based on your input file is:

Number of 5’s: 3

Number of 55’s: 2

Number of 100’s: 1

Task 6

The tally sheet written to the file: myResults1.txt

Copy of the content of the file myResults1.txt is:

Number of 5’s: 3

Number of 55’s: 2

Number of 100’s: 1

In: Computer Science

Create one sql script file to complete the following. You cannot run separate SQL statements for...

Create one sql script file to complete the following. You cannot run separate SQL statements for the homework. You will also need to place a semicolon after each SQL statement, a requirement for SQL files containing multiple SQL statements

  • Lesson 3
    1. Write a query to display the current date. Label the column DATE.
    2. Display the last name of all employees who have an A and an E in their last name.
    3. For each employee, display the employee number, last_name, salary, and salary if it were increased by 18%
      and expressed as a whole number.
    4. Modify the previous query to add a column that will subtract the old salary from the new salary. Label the column INCREASE .
    5. Display the employee's name, hire date, and salary review date, which is the first Monday after six months of service. Label the column REVIEW. Format the dates to appear in the format similar to "Sunday, the Seventh of September, 1981.
    6. For each employee display the employee name and calculate the number of months between today and the date the employee was hired. Label the column MONTHS_WORKED. Order your results by the number of months employed. Round the number of months up to the closest whole number.
    7. For each employee, display an output in this format: Employee earns monthly but wants <3 times salary>. Title the column Dream Salaries.
      Dream Salaries
      KING earns $5,000.00 monthly but wants $15,000.00.
      BLAKE earns $2,850.00 monthly but wants $8,550.00.
      CLARK earns $2,450.00 monthly but wants $7,350.00.

    8. Write a query to display name and salary for all employees. Format the salary to be 15 characters long, left-padded with $s. Label the column SALARY.
    9. Write a query that will display the employee's name with the first letter capitalized and all other letters lowercase along with the length of their name, restrict your results to include only employees whose name starts with J, A, or M. Give each column an appropriate label.
    10. Display the name, hire date, and day of the week on which the employee started. Label the column DAY. Order the results by the day of the week starting with Monday.

In: Computer Science

Mai Corporation was organized on January 1, 2016,During its first year, the corporation issued 40,000 shares...

Mai Corporation was organized on January 1, 2016,During its first year, the corporation issued 40,000 shares of $50 par value preferred stock and 300,000 shares of $10 par value common stock. At December 31, the company declared the following cash dividends:

December​2016 ​​$90,000

December​2017 ​​130,000

December​2018 ​​190,000

Required:

1. Show the allocation of dividends to each class of stock, assuming that the

  preferred stock is 8% and not cumulative.

2.  Show the allocation of dividends to each class of stock, assuming that the  

  preferred stock is 9% and cumulative.

In: Accounting

Listed below is the number of movie tickets sold at the Library Cinema-Complex, in thousands, for...

Listed below is the number of movie tickets sold at the Library Cinema-Complex, in thousands, for the period from 2004 to 2016. Compute a five-year weighted moving average using weights of 0.1, 0.1, 0.2, 0.3, and 0.3, respectively. Describe the trend in yield. (Round your answers to 3 decimal places.)

2004 8.61
2005 8.14
2006 7.67
2007 6.59
2008 7.37
2009 6.88
2010 6.71
2011 6.61
2012 5.58
2013 5.87
2014 5.94
2015 5.49
2016 5.43

The weighted moving averages are:

In: Statistics and Probability

Needed At A3M Ltd equipment is depreciated at 25% p.a. straight-line for accounting purposes, but the...

Needed

At A3M Ltd equipment is depreciated at 25% p.a. straight-line for accounting purposes, but the allowable rate for taxation is 20% p.a. The tax rate is 30%.

Equipment costed $640 000 on 1 July 2013. Assuming that no equipment is purchased or sold during the years ended 30 June 2016.

Required

a) the accounting expense and tax deduction for each year ending 2014 to 2018.

b) the impact of depreciation on the calculation of current tax expense for 2017 and 2018.

c) the effect on the deferred tax asset account for 2016, 2017 and 2018.

In: Accounting

Bonita Co. is building a new hockey arena at a cost of $2,620,000. It received a...

Bonita Co. is building a new hockey arena at a cost of $2,620,000. It received a downpayment of $450,000 from local businesses to support the project, and now needs to borrow $2,170,000 to complete the project. It therefore decides to issue $2,170,000 of 11%, 10-year bonds. These bonds were issued on January 1, 2016, and pay interest annually on each January 1. The bonds yield 10%. Prepare the journal entry to record the issuance of the bonds on January 1, 2016. Prepare a bond amortization schedule up to and including January 1, 2020, using the effective interest method.

In: Accounting

One objective of financial accounting is to provide relevant information for decision-making, including investment decisions by...

One objective of financial accounting is to provide relevant information for decision-making, including investment decisions by shareholders and potential shareholders. In this case, the balance sheet of LinkedIn showed a shareholders’ equity at September 30, 2016 that was much smaller than what Microsoft, after a bidding process, paid for that equity.

Discuss whether you feel that the accounting process resulted in a misleading presentation of LinkedIn’s equity at September, 30, 2016.

If you feel the accounting process could be improved, suggest a way of improving it. If you feel not improvement is feasible or desirable, explain your opinion.

In: Accounting

Accounting records for Ontario Corporation yield the following data for the year ended June 30, 2016 (assume sales returns are non-existent):

Accounting records for Ontario Corporation yield the following data for the year ended June 30, 2016 (assume sales returns are non-existent):
Inventory, June 30, 2015 ........................................................... $ 8,000
Purchases of inventory (on account) .............................................. 66,000
Sales of inventory-81 % on account; 19% for cash (cost $52,000) .......... 99,000
Inventory at FIFO, June 30, 2016 ................................................. 22,000
Requirements
1. Journalize Ontario's inventory transactions for the year under the perpetual system.
2. Report ending inventory, sales, cost of goods sold, and gross profit on the appropriate financial statement.

 

In: Finance

Indiana Co. began a construction project in 2016 with a contract price of $150 million to...

Indiana Co. began a construction project in 2016 with a contract price of $150

million to be received when the project is completed in 2018. During 2016, Indiana

incurred $36 million of costs and estimates an additional $84 million of costs to

complete the project. Indiana recognizes revenue over time and for this project

recognizes revenue over time according to the percentage of the project that has

been completed.

Suppose that, in 2017, Indiana incurred additional costs of $63.75 million and

estimated an additional $42.75 million in costs to complete the project. What profit

or loss will Indiana record for 2017?

In: Accounting

In 2016 the Democratic Party had a contested primary election between Hillary Clinton and Bernie Sanders....

In 2016 the Democratic Party had a contested primary election between Hillary Clinton and Bernie Sanders. They just did so again, between Joe Biden and Bernie Sanders. This essentially split the party between a progressive wing in support of Bernie Sanders and a more centrist mainstream wing in support of Hillary Clinton then Joe Biden. How was the 2016 and 2020 primary elections indicative of this division within the Democratic party? In what ways were these Democratic candidates different and how was that illustrative of current divisions within the Democratic party?

*This is all the information*

In: Economics