Define a Python function named matches that has
two parameters. Both parameters will be lists of ints. Both lists
will have the same length. Your function should use the
accumulator pattern to return a newly created list. For
each index, check if the lists' entries at that index are
equivalent. If the entries are equivalent, append the literal True
to your accumulator. Otherwise, append the literal False to your
accumulator.
Hint: Since you must use the same index with each list,
only write one loop in your function. The loop should use
the built-in range function as its collection, since that
will assign our loop variable to each index and, in the loop body,
we can use the loop variable to get each input's entry at that
index.
In: Computer Science
Describe Hunter's Algorithm for building decision trees. Build a decision out of the following ("training") dataset. The goal is to determine if a person is a defaulted borrower given values for the first four attributes. How do you deal with the attribute Annual Income with real values? For a person with values for the first four attributes 11, No, Single, 180K, is this person a defaulted borrower or not according to your newly built decision tree?
ID Home Owner Marital Status Annual Income Defaulted Borrower
1 Yes Single 125K No
2 No Married 100K No
3 No Single 70K No
4 Yes Married 120K No
5 No Divorced 95K Yes
6 No Married 60K No
7 Yes Divorced 220K No
8 No Single 85K Yes
9 No Married 75K No
10 No Single 90K Yes
In: Computer Science
The cos(x) function can be represented in a Taylor series shown below:
Write a Matlab program, and use a while loop, to calculate cos(150) (the input is in degrees) by adding terms of the series and stopping when the absolute value of the term that was added last is smaller than 0.0001.
Make sure to make the required degree <-> radian conversions.
Use fprintf to print the cos(150) (up to 2 decimal places) and the number of terms used to calculate it. Also, calculate and print the cos(150) using matlab's built-in function cosd. (Your code and the cosd function should return the same values).
In: Computer Science
Create a Python program that includes each feature specified below.
In: Computer Science
R-Studio (R Programming Language)
4. Let the data x be given by
`x <- c(1, 8, 2, 6, 3, 8, 5, 5, 5, 5)`
Use R to compute the following functions. Note, we use X1 to denote
the first element of x (which is 1) etc.
1. `(X1 + X2 + . . .+ X10)/10` (use sum)
2. Find log10(Xi) for each i. (Use the log function which by
default is base e)
3. Find `(Xi - 4.4)/2.875` for each i. (Do it all at once)
4. Find the difference between the largest and smallest values of
x. (This is the range. You can use `max` and
`min` or guess a built in command.)
```{r}
#insert your code
```
In: Computer Science
Write a small section of Python code that defines a function called check_even(value) - the function takes a numerical value as input and returns True or False based on whether the provided argument is divisible by 2 (i.e. is it odd or is it even). If the argument provided is not a number (as determined by built-in the isdigit() function - which only works on string data) then rather than crashing, the function should raise an exception which is caught outside the function (i.e. in the block of code calling the function). Provide three calls to the function: - One with an even value where the function should return True, - Another with an odd value where the function should return False, and - One with non-numerical data which should raise an exception that will be caught and displayed in the block of code that calls the function.
In: Computer Science
In the decimal system (base 10), a natural number is represented as a sequence dndn−1 . . . d0 of (decimal) digits, each of which is in the range 0..9. The value of the number is d0 ×100 +d1 ×101 +···+ dn ×10n. Similarly, in the binary system (base 2), a natural number is represented as a sequence bnbn−1 · · · b0 of (binary) digits, each of which is 0 or 1. The value of the number is b0 ×20 +b1 ×21 +···+bn ×2n. For example, the value of the number whose binary representation is 101is: 1×20+0×21+1×22 =1+0+4=5.
Without using any built-in functions for converting numbers, write a function that takes as input the binary representation of a positive integer n and returns its decimal representation.
In: Computer Science
1. Due to the COVID-19 pandemic, and the stay at home order handed out by the Governor and the President we have had to use MIS more. Tools like Zoom have become widely popular and have seen increased users. However, they have also had some challenges. What are some of the challenges that Zoom has faced in the last few weeks? How would you recommend solving them?
2. Companies like Microsoft, Amazon AWS and Google have built their platform for situations like what we are experiencing. How has cloud computing evolved over the years to allow us some form of continuity? Do you believe there will be a rise in companies moving to the cloud and will there be new entrants to the cloud landscape with companies offering Saas? What are some examples of SaaS?
In: Operations Management
Douglas and Pamela Frank are a married couple. They both worked for a railroad company for 30 years. At age 57, Douglas and age 52, Pamela retired and moved to the small town of Ovilla, TX, which has a population of approximately 3,500 residents. When the Franks moved to the town, they decided to start a child care business in their home called Nanna’s House.
Nanna’s House is licensed by the state. The state charges an annual fee of $225 to maintain the license. Insurance is required at a cost of $3,840 annually. The facility is licensed to care for a maximum of six children. The Franks charge a fee of $800 per month for each child. The monthly fee is based on a full day of care, from 8:00 a.m. to 4:00 p.m. If additional time is required beyond 4:00 p.m., parents must pay an additional charge of $15 per hour for each child. The couple provides two meals and a snack for the children. The cost of the meals and snack is $3.20 per child per day. There are six children currently enrolled.
The facility is very nice. It is an 820 square foot addition to their home that was built in 1964. The Franks purchased the home and completed the renovations for $79,500 and they believe the addition has a useful life of 25 years. The facility has a large open space for play, reading, and other activities. There is a section for sleeping which contains small cots. The facility is equipped with a small kitchen, two bathrooms and a small laundry area. The daycare increased the Franks’ utility cost by $50 each month.
During the first week of operations, the washer and dryer stopped working. Both appliances were old and had been used by the couple for many years. The old appliances cost a total of $440. While a laundry room was not initially a necessity, it became increasingly important for laundering the soiled clothes of the children, blankets, and sheets. A company nearby, Red Oak Laundry and Dry Cleaning, can launder clothing for the Franks, including pick-up and delivery, for $52 per month. Alternatively, the Franks can take clothes to the laundromat once a week, which is three miles away (one way). The applicable mileage rate is $0.56/mile. They can launder the clothes themselves at a cost of $8 per week. The self-service alternative does not include detergent or fabric sheets. The couple would need to purchase these items in order to use the laundromat. Purchasing laundry supplies in bulk from MegaMart would cost $35 every quarter. The final alternative is for the Franks to purchase a washer and dryer. The cost of the appliances is: washer $420 and dryer $380. The additional accessories for both appliances, needed for installation, cost $43.72. The store will deliver the appliances at a total cost of $35. The cost of installing the appliances is free. Both appliances are expected to last 8 years. According to the manufacturer the washer will increase energy costs by $120 per year. The dryer will increase energy costs by $145 per year. The Franks need some assistance in decision making and evaluation. They have contacted Emily Smith, their accountant, to provide some advice.
Requirements
Respond to the following Case Discussion Questions to help Douglas and Pamela make their decisions.
Case Discussion Questions
(If necessary, the Franks will use straight line depreciation. For monthly calculations, use 4.33 weeks
per month.)
In: Accounting
The graph below depicts an economy where a decline in aggregate demand has caused a recession. Assume the government
decides to conduct fiscal policy by changing taxes to reduce the burden of this recession.


Instructions: Enter your answers as a whole number. If you are entering any negative numbers be sure to include a negative sign (-) in
front of those numbers.
a. How much does aggregate demand need to change to restore the economy to its long-run equilibrium?
b. If the MPC is 0.75, how much do taxes need to change to shift aggregate demand by the amount you found in part a?
Suppose instead that the MPC is 0.8.
c. How much does aggregate demand and taxes need to change to restore the economy to its long-run equilibrium?
Aggregate demand needs to change by $_______ billion and taxes need to change by $_______ billion.
In: Economics