Questions
Python HW Open a new Jupyter notebook Create a new function named fibonacci() that takes one...

Python HW

  1. Open a new Jupyter notebook

  2. Create a new function named fibonacci() that takes one required parameter:

    1. maxint, an integer that will serve as the upper bound of the loop
  3. Following the example on the Python tutorial:

    https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming

    Our implementation will have a few changes:

    1. While you will use a while loop to make a Fibonacci sequence, the upper bound of the sequence will be your maxint parameter.
    2. Store the results into a list and append each new generated number
  4. Return the newly generated sequence as a list.

Note

In our example we are choosing to include the initial 0 value.

Expected Output

>>> fibonacci(10)
[0, 1, 1, 2, 3, 5, 8]

Task 02

In this task, you'll be asked to create a simple for-loop to loop over a simple data construct, in this case, to provide the maximum, minimum, and average length of words in a speech performing a lexicographical analysis not unlike what's used to measure reading level.

Specifications

  1. Keep working on the same notebook
  2. Create a function named lexicographics() that takes one parameter:
    1. to_analyze, a required string
  3. Using a single for loop, calculate the following for your text:
    1. The maximum number of words per line in to_analyze (eg, the length of the longest line in to_analyze)
    2. The minimum number of words per line in to_analyze (eg, the length of the shortest line in to_analyze)
    3. The average number of words per line in to_analyze, stored as a decimal.
  4. Return these values as a tuple, in the order in which they are defined above

Expected Output

>>> lexicographics('''Don't stop believing,
Hold on to that feeling.''')
(5, 3, Decimal(4.0))

In: Computer Science

We really need to get this new material-handling equipment in operation just after the new year...

We really need to get this new material-handling equipment in operation just after the new year begins. I hope we can finance it largely with cash and marketable securities, but if necessary we can get a short-term loan down at MetroBank.” This statement by Beth Davies-Lowry, president of Intercoastal Electronics Company, concluded a meeting she had called with the firm’s top management. Intercoastal is a small, rapidly growing wholesaler of consumer electronic products. The firm’s main product lines are small kitchen appliances and power tools. Marcia Wilcox, Intercoastal’s General Manager of Marketing, has recently completed a sales forecast. She believes the company’s sales during the first quarter of 20x1 will increase by 10 percent each month over the previous month’s sales. Then Wilcox expects sales to remain constant for several months. Intercoastal’s projected balance sheet as of December 31, 20x0, is as follows:

Cash

$

50,000

Accounts receivable

224,000

Marketable securities

20,000

Inventory

154,000

Buildings and equipment (net of accumulated depreciation)

667,000

Total assets

$

1,115,000

Accounts payable

$

205,800

Bond interest payable

9,000

Property taxes payable

2,400

Bonds payable (6%; due in 20x6)

360,000

Common stock

450,000

Retained earnings

87,800

Total liabilities and stockholders’ equity

$

1,115,000

Jack Hanson, the assistant controller, is now preparing a monthly budget for the first quarter of 20x1. In the process, the following information has been accumulated:

  1. Projected sales for December of 20x0 are $400,000. Credit sales typically are 70 percent of total sales. Intercoastal’s credit experience indicates that 20 percent of the credit sales are collected during the month of sale, and the remainder are collected during the following month.
  2. Intercoastal’s cost of goods sold generally runs at 70 percent of sales. Inventory is purchased on account, and 30 percent of each month’s purchases are paid during the month of purchase. The remainder is paid during the following month. In order to have adequate stocks of inventory on hand, the firm attempts to have inventory at the end of each month equal to half of the next month’s projected cost of goods sold.
  3. Hanson has estimated that Intercoastal’s other monthly expenses will be as follows:

Sales salaries

$

28,000

Advertising and promotion

16,000

Administrative salaries

28,000

Depreciation

20,000

Interest on bonds

1,800

Property taxes

600

In addition, sales commissions run at the rate of 2 percent of sales.

  1. Intercoastal’s president, Davies-Lowry, has indicated that the firm should invest $120,000 in an automated inventory-handling system to control the movement of inventory in the firm’s warehouse just after the new year begins. These equipment purchases will be financed primarily from the firm’s cash and marketable securities. However, Davies-Lowry believes that Intercoastal needs to keep a minimum cash balance of $20,000. If necessary, the remainder of the equipment purchases will be financed using short-term credit from a local bank. The minimum period for such a loan is three months. Hanson believes short-term interest rates will be 10 percent per year at the time of the equipment purchases. If a loan is necessary, Davies-Lowry has decided it should be paid off by the end of the first quarter if possible.
  2. Intercoastal’s board of directors has indicated an intention to declare and pay dividends of $30,000 on the last day of each quarter.
  3. The interest on any short-term borrowing will be paid when the loan is repaid. Interest on Intercoastal’s bonds is paid semiannually on January 31 and July 31 for the preceding six-month period.
  4. Property taxes are paid semiannually on February 28 and August 31 for the preceding six-month period.

PLEASE PREPARE THE FOLLOWING:

  1. Sales budget:
  1. Cash receipts budget:
  1. Purchases budget:
  1. Cash disbursements budget:
  1. Complete the first three lines of the summary cash budget. Then do the analysis of short-term financing needs in requirement (6). Then finish requirement (5).
  1. Calculation of required short-term borrowing.
  1. Prepare Intercoastal Electronics’ budgeted income statement for the first quarter of 20x1. (Ignore income taxes.)
  1. Prepare Intercoastal Electronics’ budgeted statement of retained earnings for the first quarter of 20x1.
  1. Prepare Intercoastal Electronics’ budgeted balance sheet as of March 31, 20x1. (Hint: On March 31, 20x1, Bond Interest Payable is $3,600 and Property Taxes Payable is $600.)

In: Accounting

Objectives: Define the new class type: Queue using a singly linked list. Define the new class...

Objectives:

  • Define the new class type: Queue using a singly linked list.
  • Define the new class type: Jukebox which creates three objects of type Queue class.
  • Practice enqueue-ing and dequeue-ing elements from the top of your singly linked list Queue class.
  • Test the implementation of the class: MyTunes.

The class files are here: https://drive.google.com/file/d/1yCCQeZCS-uLoL_CK0Et9dX-KCaokXQxR/view?usp=sharing

class MyTunes

Creates an object of type MyTunes class that partially simulate the digital jukebox TouchTunes, using a queue which holds playlist. Tests the implementation of your Queue and Jukebox classes.

From main your program:

  • Starts by creating an object of type MyTunes which initializes three playlists favoritesPL, loungePL, and roadTrip by reading the input file "tunes.txt" which contains one type of line entry:
    • playlist songTitle
      Indicates that the user wants to add a SongEntry object with a specific songTitle to the playlist .
  • Then it prompts the user for total songs they want to play.
  • It simulates playing one song at a time from each playlist until either:
    • we've played the total requested number of songs;
    • or all playlists are empty.
  • Reminder: in a queue data structure we process items in FIFO (First-In-First-Out) order.

class Jukebox

Define the class Jukebox to manage three objects of type Queue<SongEntry>. The class Jukebox manages three objects of type Queue. An instance of the class may read a file which includes the user's requests for a the name of a song to be added to a specific playlist. It will then add songs to the three playlists "favorites", "lounge", and "road trip" accordingly.

Attributes:

  • A variable called favoritePL of type Queue<SongEntry> which simulates the playlist referred to as "favorites" in the input file.
  • A variable called roadTripPL of type Queue<SongEntry> which simulates the playlist referred to as "road trip" in the input file.
  • A variable called loungePL​ of type Queue<SongEntry> which simulates the playlist referred to as "lounge" in the input file.

Methods:

  • A method called fillPlaylists()  reads the test file and then adds songs to one of the three queues. For example, if the file contains line:

    favorites,title 
    

    Then the first song found that equals the title will be placed in the favorites playlist.

  • Accessor methods getFavoritePL(), getRoadTripPL() and getLoungePL() for each of the three queue structures favoritePL, roadTripPL and loungePL respectively.

class Queue<Type>

Define the parameterized class Queue which implements Iterable. Objects of type Queue manage items in a singly linked list where we can enqueue() items to the end and dequeue() items from the front of the queue.

Attributes:

  • A variable called name of type String for the name of this instance. We we will use this for testing and debugging purposes.
  • A variable called head, which points to the front of the queue.
  • A variable called tail​, which points to the end of the queue.

Methods:

  • A constructor that takes in a user assigned name and initializes the class attributes.
  • A method called enqueue() which takes a generic item as the argument and adds the item to the end of the queue.
  • A method called dequeue() which receives no arguments and removes the item from the front of the queue. This method should return the generic item dequeue-ed. This method should throw an NoSuchElementException if the queue is empty.
  • A method called peek which looks at the least recently added item of the queue and returns an object of the generic type for the data seen at the front of the queue. The item should not be removed from the front of the queue.
    NOTE: If the queue is empty, returns null.
  • The methods isEmpty(), size() and toString() method.

Input File Format:

The format of the "tunes.txt" input file is:

favorites,Shadows - Original
road trip,Tom's Diner
favorites,Take Me Away
road trip,Here With Me
lounge,Nuvole Bianche
lounge,Luka
favorites,Stoned
road trip,Get Happy
favorites,We Belong
road trip,Let's Dance
road trip,Oh What a Feeling
favorites,Stairway To The Stars
road trip,Separate Ways (Worlds Apart)
road trip,Road Home
lounge,Traffic

Output of example 1 showing non-empty queues:

Welcome! We have over 59600 in FoothillTunes store! 
Total number of songs in playlists: 16

Songs in each playlist:

favorites:
[Shadows - Original, 0:0:25, Blue Oyster Cult, classic pop and rock;
Take Me Away, 0:4:32, Blue Oyster Cult, classic pop and rock;
Stoned, 0:11:47, Dido, classic pop and rock;
We Belong, 0:3:43, Pat Benatar, classic pop and rock;
Stairway To The Stars, 0:3:46, Blue Oyster Cult, classic pop and rock]

lounge:
[Solo, 0:4:41, Working Week, classic pop and rock;
Nuvole Bianche, 0:5:58, Ludovico Einaudi, classical;
Luka, 0:3:52, Suzanne Vega, classic pop and rock;
Traffic, 0:4:5, Dawn Landes, classic pop and rock]

road trip:
[Tom's Diner, 0:2:40, Suzanne Vega, classic pop and rock;
Here With Me, 0:4:41, Dido, classic pop and rock;
Get Happy, 0:6:36, Jean Knight, classic pop and rock;
Let's Dance, 0:2:45, Jake Shimabukuro, folk;
Oh What a Feeling, 0:3:42, Gregory Isaac, classic pop and rock;
Separate Ways (Worlds Apart), 0:5:25, Journey, classic pop and rock;
Road Home, 0:5:8, The String Cheese Incident, folk]

Enter your the number of songs you would like to play:
7

Playing 7 number of songs...
Playing song title "Shadows - Original"
Playing song title "Solo"
Playing song title "Tom's Diner"
Playing song title "Take Me Away"
Playing song title "Nuvole Bianche"
Playing song title "Here With Me"
Playing song title "Stoned"

Checking the size of each playlist:
Playlist "favorites" is 2 song(s) remaining.
Playlist "lounge" is 2 song(s) remaining.
Playlist "road trip" is 5 song(s) remaining.

Songs in each list:

favorites:
[We Belong, 0:3:43, Pat Benatar, classic pop and rock;
Stairway To The Stars, 0:3:46, Blue Oyster Cult, classic pop and rock]

lounge:
[Luka, 0:3:52, Suzanne Vega, classic pop and rock;
Traffic, 0:4:5, Dawn Landes, classic pop and rock]

road trip:
[Get Happy, 0:6:36, Jean Knight, classic pop and rock;
Let's Dance, 0:2:45, Jake Shimabukuro, folk;
Oh What a Feeling, 0:3:42, Gregory Isaac, classic pop and rock;
Separate Ways (Worlds Apart), 0:5:25, Journey, classic pop and rock;
Road Home, 0:5:8, The String Cheese Incident, folk]

Done with MyTunes.

Output of example 2 with input test file "tunes_truncated.txt" where some queues are empty when calling dequeue() method of class Queue:

Welcome! We have over 59600 in FoothillTunes store! 
Total number of songs in playlists: 3

Songs in each playlist:

favorites:
[Shadows - Original, 0:0:25, Blue Oyster Cult, classic pop and rock]

lounge:
[Solo, 0:4:41, Working Week, classic pop and rock]

road trip:
[Tom's Diner, 0:2:40, Suzanne Vega, classic pop and rock]

Enter your the number of songs you would like to play:
4

Playing 4 number of songs...
Playing song title "Shadows - Original"
Playing song title "Solo"
Playing song title "Tom's Diner"

Checking the size of each playlist:
Playlist "favorites" has *no* songs remaining.
Playlist "lounge" has *no* songs remaining.
Playlist "road trip" has *no* songs remaining.

Songs in each list:

favorites:
[ ]

lounge:
[ ]

road trip:
[ ]

Done with MyTunes.

In: Computer Science

Take Five Systems, a new start-up, is developing a new iPhone application (“app”) and provides you...

Take Five Systems, a new start-up, is developing a new iPhone application (“app”) and provides you with the following assumptions:

  1. Development and testing of the new app will take four months. Month five is the first month of revenue generation.

  2. Initial monthly app sales of 5,000 downloads at a price of $2.99

  3. Unit sales will grow at 15% per month for months six through twelve and then will be flat thereafter

  4. The app will become obsolete and will need to be revised/replaced after month 18

  1. Take Five Systems is concerned about the accuracy of their revenue estimates in Question 1. Specifically, they wish to use sensitivity analysis to evaluate the impact on Month 18 revenue of the following:

    1. Variations in 2% increments between 9-21% in the growth rate of unit sales in Months 5-12 (that is, 9%, 11%,..., 19%, 21%)

    2. Variationin500unitincrementsbetween2,500and7,500inthelevelofinitial sales (that is, 2,500, 3,000,..., 7,000, 7,500)

In: Finance

“We really need to get this new material-handling equipment in operation just after the new year...

“We really need to get this new material-handling equipment in operation just after the new year begins. I hope we can finance it largely with cash and marketable securities, but if necessary we can get a short-term loan down at MetroBank.” This statement by Beth Davies-Lowry, president of Intercoastal Electronics Company, concluded a meeting she had called with the firm’s top management. Intercoastal is a small, rapidly growing wholesaler of consumer electronic products. The firm’s main product lines are small kitchen appliances and power tools. Marcia Wilcox, Intercoastal’s General Manager of Marketing, has recently completed a sales forecast. She believes the company’s sales during the first quarter of 20x1 will increase by 10 percent each month over the previous month’s sales. Then Wilcox expects sales to remain constant for several months. Intercoastal’s projected balance sheet as of December 31, 20x0, is as follows:

Cash

$

35,000

Accounts receivable

252,000

Marketable securities

10,000

Inventory

231,000

Buildings and equipment (net of accumulated depreciation)

670,000

Total assets

$

1,198,000

Accounts payable

$

220,500

Bond interest payable

22,500

Property taxes payable

4,800

Bonds payable (15%; due in 20x6)

360,000

Common stock

400,000

Retained earnings

190,200

Total liabilities and stockholders’ equity

$

1,198,000

Jack Hanson, the assistant controller, is now preparing a monthly budget for the first quarter of 20x1. In the process, the following information has been accumulated:

  1. Projected sales for December of 20x0 are $600,000. Credit sales typically are 60 percent of total sales. Intercoastal’s credit experience indicates that 30 percent of the credit sales are collected during the month of sale, and the remainder are collected during the following month.
  2. Intercoastal’s cost of goods sold generally runs at 70 percent of sales. Inventory is purchased on account, and 50 percent of each month’s purchases are paid during the month of purchase. The remainder is paid during the following month. In order to have adequate stocks of inventory on hand, the firm attempts to have inventory at the end of each month equal to half of the next month’s projected cost of goods sold.
  3. Hanson has estimated that Intercoastal’s other monthly expenses will be as follows:

Sales salaries

$

45,000

Advertising and promotion

25,000

Administrative salaries

45,000

Depreciation

15,000

Interest on bonds

4,500

Property taxes

1,200

In addition, sales commissions run at the rate of 2 percent of sales.

  1. Intercoastal’s president, Davies-Lowry, has indicated that the firm should invest $115,000 in an automated inventory-handling system to control the movement of inventory in the firm’s warehouse just after the new year begins. These equipment purchases will be financed primarily from the firm’s cash and marketable securities. However, Davies-Lowry believes that Intercoastal needs to keep a minimum cash balance of $25,000. If necessary, the remainder of the equipment purchases will be financed using short-term credit from a local bank. The minimum period for such a loan is three months. Hanson believes short-term interest rates will be 10 percent per year at the time of the equipment purchases. If a loan is necessary, Davies-Lowry has decided it should be paid off by the end of the first quarter if possible.
  2. Intercoastal’s board of directors has indicated an intention to declare and pay dividends of $50,000 on the last day of each quarter.
  3. The interest on any short-term borrowing will be paid when the loan is repaid. Interest on Intercoastal’s bonds is paid semiannually on January 31 and July 31 for the preceding six-month period.
  4. Property taxes are paid semiannually on February 28 and August 31 for the preceding six-month period.

PLEASE PREPARE THE FOLLOWING:

1) Sales budget:

2) Cash receipts budget:

3) Purchases Budget

4) Cash disbursements budget:

5) Complete the first three lines of the summary cash budget. Then do the analysis of short-term financing needs in requirement (6). Then finish requirement (5).

6) Calculation of required short-term borrowing.

7) Prepare Intercoastal Electronics’ budgeted income statement for the first quarter of 20x1. (Ignore income taxes.)

8) Prepare Intercoastal Electronics’ budgeted statement of retained earnings for the first quarter of 20x1.

9) Prepare Intercoastal Electronics’ budgeted balance sheet as of March 31, 20x1. (Hint: On March 31, 20x1, Bond Interest Payable is $9,000 and Property Taxes Payable is $1,200.)

PLEASE HELP! THANK YOU!!

In: Accounting

Being Human, Inc., recently issued new securities to finance a new TV show. The project cost...

Being Human, Inc., recently issued new securities to finance a new TV show. The project cost $35 million, and the company paid $2.2 million in flotation costs. In addition, the equity issued had a flotation cost of 7 percent of the amount raised, whereas the debt issued had a flotation cost of 3 percent of the amount raised. If the company issued new securities in the same proportion as its target capital structure, what is the company’s target debt-equity ratio?

In: Finance

1. Take Five Systems, a new start-up, is developing a new iPhone application (“app”) and provides...

1. Take Five Systems, a new start-up, is developing a new iPhone application (“app”) and provides you with the following assumptions: a. Development and testing of the new app will take four months. Month five is the first month of revenue generation. b. Initial monthly app sales of 5,000 downloads at a price of $2.99 c. Unit sales will grow at 15% per month for months six through twelve and then will be flat thereafter d. The app will become obsolete and will need to be revised/replaced after month 18 Use the data provided to forecast Take Five’s monthly revenue for Months 1-18

2. Take Five Systems is concerned about the accuracy of their revenue estimates in Question 1. Specifically, they wish to use sensitivity analysis to evaluate the impact on Month 18 revenue of the following: a. Variations in 2% increments between 9-21% in the growth rate of unit sales in Months 5-12 (that is, 9%, 11%,…, 19%, 21%) b. Variation in 500 unit increments between 2,500 and 7,500 in the level of initial sales (that is, 2,500, 3,000,…, 7,000, 7,500)

could you please show me how to do question 2 on excel? Thank you

In: Finance

New Orleans Shipping. If the share price of​ Emaline, a New​ Orleans-based shipping​ firm, rises from...

New Orleans Shipping. If the share price of​ Emaline, a New​ Orleans-based shipping​ firm, rises from $12.13 to $15.96 over a​ one-year period, calculate the rate of return to the shareholder given each of the​ following:

a. The company paid no dividends.

b. The company paid a dividend of $1.01 per share.

c. The company paid the dividend and the total return to the shareholder is separated into the dividend yield and the capital gain.

In: Finance

Oscar’s Corp. is considering starting a new business involving bicycle production. This new business involves purchases...

Oscar’s Corp. is considering starting a new business involving bicycle production. This new business involves purchases of $8 million of new equipment. This new business is anticipated to generate net income of $1.45 million per year for 6 years. The company uses straight-line depreciation to zero salvage value for tax purposes. Assuming a 28 percent tax rate calculate the project's IRR.

In: Finance

Is Boeing working internationally to access new markets? To gain low-cost input factors? To develop new...

  1. Is Boeing working internationally to access new markets?
  2. To gain low-cost input factors?
  3. To develop new competencies?
  4. Is its approach in all three areas appropriate?

In: Operations Management