Questions
Python question Your code can make use of any of the BinarySearchTree ADT methods: BinarySearchTree(), insert_left(),...

Python question

Your code can make use of any of the BinarySearchTree ADT methods: BinarySearchTree(), insert_left(), insert_right(), get_left(), get_right(), set_left(), set_right(),get_data(), set_data(), search(), __contains__ and insert().

Define a function called create_bst_from_list(values) which takes a list of values as a parameter. The function should create a binary search tree by using the insert() method.

Note: You can assume that the BinarySearchTree class is given and the parameter list is not empty.

For example:

Test Result
tree = create_bst_from_list([7, 12, 4, 9, 20])
print_tree(tree, 0)
7
(L)    4
(R)    12
(L)        9
(R)        20
tree = create_bst_from_list([8, 3, 1, 6, 4, 25, 78])
print_tree(tree, 0)
8
(L)    3
(L)        1
(R)        6
(L)            4
(R)    25
(R)        78
class BinarySearchTree:
    def __init__(self, data, left=None, right=None):
        self.__data = data
        self.__left = left
        self.__right = right
    def insert_left(self, new_data):
        if self.__left == None:
            self.__left = BinarySearchTree(new_data)
        else:
            tree = BinarySearchTree(new_data, left=self.__left)
            self.__left = tree
    def insert_right(self, new_data):
        if self.__right == None:
            self.__right = BinarySearchTree(new_data)
        else:
            tree = BinarySearchTree(new_data, right=self.__right)
            self.__right = tree
    def get_left(self):
        return self.__left
    def get_right(self):
        return self.__right
    def set_left(self, left):
        self.__left = left
    def set_right(self, right):
        self.__right = right
    def set_data(self, data):
        self.__data = data
    def get_data(self):
        return self.__data

I need answers soon. Please!

In: Computer Science

Haley Company produces one product and has the capacity to make 150,000 units per month. The...

Haley Company produces one product and has the capacity to make 150,000 units per month. The cost that is associated with producing 125,000 units is shown below:

Account

Per Unit

Cost at 125,000 units

Direct Materials $ 20.00 $2,500,000.00
Direct Labor $ 30.00 $3,750,000.00
Variable Manufacturing overhead $ 10.00 $1,250,000.00
Fixed Manufacturing overhead $ 15.00 $1,875,000.00
Variable selling and administrative expenses $ 12.00 $1,500,000.00
Fixed selling and administrative expenses $ 14.00 $1,750,000.00
Totals $ 101.00 $12,625,000.00

The selling price per unit is $150. The Haley company was contacted by a prospective customer interested in purchasing 25,000 units for $100. The management team is considering this offer and in the meeting about this new prospect, you (the management accountant), stated that the fixed cost will remain the same, but the variable cost will increase along with $10 shipping expense due to the customer’s international location. Management has asked you to determine if they should accept or reject the new customer proposal and what nonmonetary factors should be considered.

Account Per Unit Cost at 125,000 units
Direct Materials $              20.00 $2,500,000.00
Direct Labor $              30.00 $3,750,000.00
Variable Manufacturing overhead $              10.00 $1,250,000.00
Fixed Manufacturingoverhead $              15.00 $1,875,000.00
Variable selling and adminidtrative expenses $              12.00 $1,500,000.00
Fixed selling and administrative expenses $              14.00 $1,750,000.00
Totals $101.00 $12,625,000.00
Accounts Normal Volume Additional volume Combined Total
Sales
Cost and Expenses:
Direct Materials
Direct Labor
Variable Overhead
Fixed Overhead
Variable Selling and Admin exp.
Fixed selling and Admin exp.
Total costs and expenses:
Net Income $                    -   $                          -   $                   -  

In: Accounting

Financial data for Joel de Paris, Inc., for last year follow: Joel de Paris, Inc. Balance...

Financial data for Joel de Paris, Inc., for last year follow:

Joel de Paris, Inc.
Balance Sheet
Beginning
Balance
Ending
Balance
Assets
Cash $ 130,000 $ 125,000
Accounts receivable 346,000 486,000
Inventory 572,000 472,000
Plant and equipment, net 832,000 837,000
Investment in Buisson, S.A. 404,000 429,000
Land (undeveloped) 250,000 253,000
Total assets $ 2,534,000 $ 2,602,000
Liabilities and Stockholders' Equity
Accounts payable $ 379,000 $ 331,000
Long-term debt 998,000 998,000
Stockholders' equity 1,157,000 1,273,000
Total liabilities and stockholders' equity $ 2,534,000 $ 2,602,000


Joel de Paris, Inc.
Income Statement
Sales $ 4,940,000
Operating expenses 4,297,800
Net operating income 642,200
Interest and taxes:
Interest expense $ 114,000
Tax expense 205,000 319,000
Net income $ 323,200


The company paid dividends of $207,200 last year. The “Investment in Buisson, S.A.,” on the balance sheet represents an investment in the stock of another company. The company's minimum required rate of return of 15%.

Required:

1. Compute the company's average operating assets for last year.

2. Compute the company’s margin, turnover, and return on investment (ROI) for last year. (Do not round intermediate calculations and round your final answers to 2 decimal places.)

3. What was the company’s residual income last year?

In: Accounting

one of the marketing characteristic of packaging is to drive association created by advertising into the...

one of the marketing characteristic of packaging is to drive association created by advertising into the consumer mind. Discuss specifically what this means, using several marketplace illustrations to support your explaination.

In: Economics

On Monday morning, your buy one CME British Pound futures contract (i.e., you buy BP) containing...

On Monday morning, your buy one CME British Pound futures contract (i.e., you buy BP) containing BP 62,500 at a price of $1.4118.  Suppose the broker requires an initial margin of $1,925 and a maintenance margin of $1,750.  The settlement prices for Monday through Friday are $1.4108, $1.4118, $1.4085, $1.4076, and $1.4072, respectively.   Assume that you begin with an initial balance of $2,000 (not $1,925).  Fill out the following tables.  Make sure you show your calculation. (To get exact answers, show 4 digits after the decimal point.  If your calculation can’t show 4 digits after the decimal point, use excel spread sheet for the calculation) (9 points)

     

Monday

Morning

Monday

Close

Tuesday

Close

Wednesday

Close

Thursday

Close

Friday

Close

Future price

$1.4118

$1.4108

$1.4118

$1.4085

$1.4076

$1.4072

Daily gain/Loss

Remaining

Balance

Variation Margin

Balance

In: Finance

What do you think is the most pressing social problem facing America throughout the term of...

What do you think is the most pressing social problem facing America throughout the term of the last five presidents and today? What do you feel is the role of the government in the process of dealing with the social problems of their time on the micro and macro levels? What do you think has shaped your views?

In: Psychology

Write the formula for the Bronsted-Lowry conjugate acid for each of the following bases. NH2- HSO4-...

Write the formula for the Bronsted-Lowry conjugate acid for each of the following bases.

NH2-

HSO4-

OH-

NH3

H2O

In: Chemistry

match Point is a retail sports store carrying tennis apparel and equipment. The store is at...

match Point is a retail sports store carrying tennis apparel and equipment. The store is at the end of its second year of operation and is struggling. A major problem is that its cost of inventory has continually increased in the past two years. In the first year of operations, the store assigned inventory costs using LIFO. A loan agreement the store has with its bank, its prime source of financing, requires the store to maintain a certain profit margin and current ratio. The store's owner is currently looking over Match Point’s preliminary financial statements for its second year. The numbers are not favorable. The only way the store can meet the required financial ratios agreed on with the bank is to change from LIFO to FIFO. The store originally decided on LIFO because of its tax advantages. The owner recalculates ending inventory using FIFO and submits those numbers and statements to the loan officer at the bank for the required bank review. The owner thankfully reflects on the available latitude in choosing the inventory costing method.

Required:

  1. How does Match Point’s use of FIFO improve its net profit margin and current ratio?
  2. Is the action by Match Point’s owner ethical? Please justify your answer with an explanation.

In: Accounting

1) IND’s are typically needed for the following: (more than one answer) Group of answer choices...

1)

IND’s are typically needed for the following: (more than one answer)

Group of answer choices

Human testing of a Monograph drug active in a new formulation using dose levels/concentrations approved in the Monograph.

Human testing of a Monograph drug active at a higher dose than that approved in the Monograph.

Human testing a Monograph drug active using a route of administration other than that approved in the Monograph

Human testing of a new chemical entity

2)

To grant a patent, the technology must be non-obvious and have utility. (True or False)

Group of answer choices

True

False

3)

Rectally administered suppositories can be used to avoid hepatic first-pass metabolism of systemically absorbed drug actives and this is their primary use in OTC drug products. (True or False)

Group of answer choices

True

False

4)

Which section(s) of the GI tract do NOT have villi present to increase absorptive surface area? (More than one answer)

Group of answer choices

Ileum

Descending colon

Esophagus

Jejunum

Cecum

5)

Under the FD&C Act, which of these shows that a lipstick is adulterated? (More than one answer)

Group of answer choices

Contains poisonous substances which might be injurious to user under the condition of use prescribed in the label

Contains a label that with listing of all ingredients

Contains a stand of stray hair inside the lipstick bullet

Contains small beads of liquid knowns as “sweating” around the lipstick bullet

In: Biology

1. List and briefly describe the types of Parallel Computer Memory Architectures. What type is used...

1. List and briefly describe the types of Parallel Computer Memory Architectures. What type is used by OpenMP and why?

2. What is Parallel Programming?

In: Computer Science

Describe electromagnetic waves, frequency of light, wavelength of light, and speed of light in vacuum and...

  • Describe electromagnetic waves, frequency of light, wavelength of light, and speed of light in vacuum and in medium.
  • In your own words, explain index of refraction and light propagation from one medium to another.
  • In your own words, explain polarization and light intensity.

In: Physics

INPUT DATA: KEY OUTPUT: Amount needed by the firm: $170,000 Issue amount ($): $200,000 Flotation costs...

INPUT DATA: KEY OUTPUT: Amount needed by the firm: $170,000 Issue amount ($): $200,000 Flotation costs (in decimal form): 10.00% # of shares: 8,000 Other issuing expenses: $10,000 Stock price per share: $25.00 Underwriting fees $20,000 Other expenses $10,000 Total issuing costs $30,000 Amt of usable funds $170,000

Diction Publishing estimates that it needs $500,000 to support its expected growth. The underwriting fees charged by the investment banking firm for which you work are 6.5% for such issue sizes. In addition, it is estimated that Diction will incur $4,900 in other expenses related to the IPO. c. Suppose that Diction’s investment banker charges 8.2% rather than 6.5%. Assuming that all other information given earlier is the same, how many shares must Diction issue in this situation to net the company the $500,000 it needs? d. Suppose everything is the same as originally presented, except Diction will incur $5,835 in other expenses rather than $4,900. In this situation, how many shares must Diction issue to net the company the $500,000 it needs?

In: Finance

Based on your professional and/or educational experience, how often do you believe system log files should...

Based on your professional and/or educational experience, how often do you believe system log files should be checked? How vigilant are you regarding regular checks of these files? When discussing, please also outline some of the reasons why an administrator might tend to ignore these files.

In: Computer Science

A piston-cylinder assembly has a liquid-vapor mixture of R-134a, with initial total mass of 3 kg,...

A piston-cylinder assembly has a liquid-vapor mixture of R-134a, with initial total mass of 3 kg, total volume of 0.12 m3 and a temperature of 10°C. The refrigerant then undergoes two processes in series: constant-temperature process followed by a constant- pressure process. At the end of the constant-pressure process, the pressure is 140 kPa and the R-134a is all saturated liquid. The constant temperature process is adiabatic while the constant-pressure process is not. Neglect kinetic and potential effects.

a. Solve for the initial quality of the liquid-vapor mixture of R-134a.

b. Determine the work and heat transfer for the constant-temperature process, in kJ.

c. Determine the work and heat transfer for the constant-pressure process, in kJ.

In: Other

Normalizing schema to third normal form (3NF) ,no coding needed! SHIPPING (ShipName, ShipType, VoyageID, Cargo, Port,...

Normalizing schema to third normal form (3NF) ,no coding needed! SHIPPING (ShipName, ShipType, VoyageID, Cargo, Port, ArrivalDate) Key: ShipName, ArrivalDate FD1: ShipName > ShipType FD2: VoyageID > ShipName, Cargo FD3: ShipName, ArrivalDate > VoyageId, Port

1.Normalize SHIPPING to 3NF showing PKs, any FKs, functional dependencies. Show the normal form of the schema at each step in the process (e.g. 2NF?, 3NF?).

2..Please list the final set of 3NF schema including all its keys.

3 .Do any of the finalized 3NF schema have determinates that are not candidate keys? If yes, explain - which schema(s)? Why?

In: Computer Science