Questions
Python Pierrette is at Legoland. She enjoys all the rides but hates to wait in lines....

Python

Pierrette is at Legoland. She enjoys all the rides but hates to wait in lines. Thanks to technology,

she has an app that tells her for each ride i a time ti when there is no line. However, she wants to

take the rides in increasing fun factor order. Pierrette assigns each ride i a fun factor fi . What is

the maximum number of rides she can take?

Make sure that your code runs in O(n2 ) time in order to pass all the test cases (n is the number of

rides)

# [last_name] [first_name], [student_ID]

from typing import List


def max_num_rides(rides: List[List[int]]) -> int:

    """Calculate the maximum number of rides one can take with given constraints.

    Pierrette is at Legoland. She enjoys all the rides but hates to wait in lines.

    Thanks to technology, she has an app that tells her for each ride a time when

    there is no line. However, she wants to take the rides in increasing fun factor

    order. Pierrette assigns each ride a fun factor. This function takes pairs of

    times and fun factors for all the rides, and returns the maximum number of

    rides Pierrette can take.

    Arguments:

        rides (list): A list of [time, fun factor] pairs. For each ride, the rides

            list contains a pair of time and fun factor. Both the time and the fun

            factor are integers. Assume that it takes no time to take a ride. You

            may further assume that all the time values are distinct and all the

            fun factor values are also distinct.

    Returns:

        int: The maximum number of rides Pierrette can take.

    Examples:

        >>> print(max_num_rides([[2, 5], [1, 3]]))

        2

        >>> print(max_num_rides([[4, 2], [42, 3], [59, 8], [12, 4], [1, 5], [5, 7]]))

        3

    """

    pass # FIXME

In: Computer Science

question 8 parts a-e a Returns on stocks X and Y are listed below: Period 1...

question 8 parts a-e

a

Returns on stocks X and Y are listed below:

Period 1 2 3 4 5 6 7
Stock X 8% 0% 3% -2% 5% 12% 7%
Stock Y 5% -2% 4% 7% 1% 12% -3%

What is the correlation of returns on the two stocks?

Please round your answer to the nearest hundredth.

Note that the correct answer will be evaluated based on the full-precision result you would obtain using Excel.

b

Returns on stocks X and Y are listed below:

Period 1 2 3 4 5 6 7
Stock X 6% 5% -2% 10% 3% 8% -4%
Stock Y 11% 7% 10% -2% 3% 5% -1%

Consider a portfolio of 70% stock X and 30% stock Y.

What is the mean of portfolio returns?

Please specify your answer in decimal terms and round your answer to the nearest thousandth (e.g., enter 12.3 percent as 0.123).

c

Returns on stocks X and Y are listed below:

Period 1 2 3 4 5 6 7
Stock X -5% 4% 3% 9% 1% -3% 4%
Stock Y 12% 7% -3% -2% 4% 6% -1%

Consider a portfolio of 60% stock X and 40% stock Y.

What is the (population) variance of portfolio returns?

Please round your answer to six decimal places.

Note that the correct answer will be evaluated based on the full-precision result you would obtain using Excel.

d

Summary statistics for returns on two stocks X and Y are listed below.

Mean Variance
Stock X 2.35% 0.007000
Stock Y 4.53% 0.003000

The covariance of returns on stocks X and Y is 0.002700. Consider a portfolio of 70% stock X and 30% stock Y.

What is the mean of portfolio returns?

Please specify your answer in decimal terms and round your answer to the nearest thousandth (e.g., enter 12.3 percent as 0.123).

e

Summary statistics for returns on two stocks X and Y are listed below.

Mean Variance
Stock X 3.41% 0.003000
Stock Y 5.25% 0.004000

The covariance of returns on stocks X and Y is 0.001800. Consider a portfolio of 20% stock X and 80% stock Y.

What is the variance of portfolio returns?

Please round your answer to six decimal places.

Note that the correct answer will be evaluated based on the full-precision result you would obtain using Excel.

In: Finance

A developer wants to know if the houses in two different neighborhoods were built at roughly...

A developer wants to know if the houses in two different neighborhoods were built at roughly the same time. She takes a random sample of six houses from each neighborhood and finds their ages from local records. The accompanying table shows the data for each sample​ (in years). Assume that the data come from a distribution that is Normally distributed.

Neighborhood 1: 50, 68, 65, 52, 53, 54

Neighborhood 2: 33, 32, 44, 38, 54, 51

​a) Find a 95​% confidence interval for the mean​ difference μ1- μ2​, in ages of houses in the two neighborhoods. (Round to two decimal places as needed)

​b) Is 0 within the confidence​ interval?

(Yes or No)

​c) What does the confidence interval suggest about the null hypothesis that the mean difference is​ 0?

A.Reject H0 since 0 is a plausible value for the true mean difference.

B. Fail to reject H0 since 0 is a plausible value for the true mean difference.

C.Reject H0 since 0 is not a plausible value for the true mean difference.

D.Fail to reject H0 since 0 is not a plausible value for the true mean difference.

In: Math

1. let's say CFTR (encoding the CFTR Cl- channel) has two alleles: + (which encodes a...

1. let's say CFTR (encoding the CFTR Cl- channel) has two alleles: + (which encodes a functional product) and - (which encodes a non-functional product). CFTR is a Cl- transporter expressed in many epithelial cells. LDLR is on chromosome 7. A person with the -/- genotype has Cystic Fibrosis but those with either +/- or +/+ genotypes do not. Which of the following is true?

a. Cystic Fibrosis is autosomal recessive because a person must have two copies of the "-" allele to express the phenotype

b. Cystic Fibrosis is autosomal dominant because the "+" allele is the normal version

c. Cystic Fibrosis is autosomal dominant because the "+" allele is the most common in the population

d. Cystic Fibrosis is autosomal dominant, because a person must have two copies of the "-" allele to express the phenotype

e. Cystic Fibrosis is autosomal recessive because it is the "-" allele that causes the disease

2.

let's say SLC2A4 (encoding the insulin-dependent glucose transporter GLUT4) has two alleles: + (which encodes a functional product) and - (which encodes a non-functional product). If GLUT4 expression is necessary to not have diabetes, which of the following can we definitely conclude? (More than one answer may seem correct but only one answer logically follows the information)

a. a +/- genotype will have a mild form of diabetes

b. a -/- genotype will have diabetes

c. a -/- genotype may not have diabetes

d. a +/- genotype will have a 50% probability of diabetes

e. a +/+ genotype will not have diabetees

3.

a pretty good definition of a gene is

a. one of the homologous chromosome inherited from either the egg (mother) or sperm (father)

b. a discrete segment of DNA that encodes a functional product

c. one of two or more alternative forms of nucleotide that arise by mutation and are found at the same place on a chromosome.

d. the mRNA that is translated into a polypeptide

e. the bluprint for the phenotype

4.

In the chart:

A B C D
+/+ 100% functional protein watery no disease
+/- 50% functional protein intermediate no disease
-/- 0% functional protein thick disease

What is in column A?

a. different genes

b. different phenotypes

c. different genotypes

d. different loci

e. different proteins

In: Anatomy and Physiology

Question: Please I need answers for "REQUIREMENTS" 7 and 8. Leeds Company has an opportunity to...

Question: Please I need answers for "REQUIREMENTS" 7 and 8.

Leeds Company has an opportunity to invest in one or two new projects. Project A requires a $350,000 investment for new machinery with a

four-year life and no salvage value. Project B requires a $350,000 investment for new machinery with a three-year life and a $10,000 salvage value. The two projects yield the following predicted annual results. The company uses straight-line depreciation and cash flows occur evenly throughout each year.

Project A

Sales

$350,000

Expenses:

Direct materials

49,000

Direct labor

70,000

Overhead including depreciation

126,000

Selling & administrative expenses

25,000

Tax rate

30%

Project B

Sales

$280,000

Expenses:

Direct materials

35,000

Direct labor

42,000

Overhead including depreciation

126,000

Selling & administrative expenses

25,000

Tax rate

30%

REQUIREMENTS:

2. Determine each project’s net present value using 8% as the discount rate (this is your interest rate). Assume that cash flows occur at each year-end (round to nearest dollar). Complete with both manual math formulas and using the Excel NPV formula.

7.   Create and apply different Excel scenarios with the Scenario Manager.

8.   Generate a scenario summary report.

In: Accounting

General Monsters Corporation has two plants for producing juggernauts, one in Flint and one in Inkster....

General Monsters Corporation has two plants for producing juggernauts, one in Flint and one in Inkster. The Flint plant produces according to fF (x1, x2) = min{x1, 2x2} and the Inkster plant produces according to fI (x1, x2) = min{2x1, x2}, where x1 and x2 are the inputs. 1. On a graph, use blue ink to draw the isoquant for 40 juggernauts at the Flint plant. Use red ink to draw the isoquant for producing 40 juggernauts at the Inkster plant. 2. Suppose that the firm wishes to produce 20 juggernauts at each plant. How much of each input will the firm need to produce 20 juggernauts at the Flint plant? How much of each input will the firm need to produce 20 juggernauts at the Inkster plant? Label with an a on the graph, the point representing the total amount of each of the two inputs that the firm needs to produce a total of 40 juggernauts, 20 at the Flint plant and 20 at the Inkster plant. 3. Label with a b on your graph the point that shows how much of each of the two inputs is needed in total if the firm is to produce 10 juggernauts in the Flint plant and 30 juggernauts in the Inkster plant. Label with a c the point that shows how much of each of the two inputs that the firm needs in total if it is to produce 30 juggernauts in the Flint plant and 10 juggernauts in the Inkster plant. Use a black pen to draw the firm’s isoquant for producing 40 units of output if it can split production in any manner between the two plants. Is the technology available to this firm convex?

In: Economics

obs gpa iq gender concept 1 7.94 121 2 69 2 8.292 120 2 71 3...

obs     gpa     iq      gender  concept
1       7.94    121     2       69
2       8.292   120     2       71
3       4.643   111     2       44
4       7.47    106     2       44
5       8.882   108     1       69
6       7.585   98      2       72
7       7.65    121     2       53
8       2.412   75      2       26
9       6       109     1       47
10      8.833   122     2       64
11      7.47    109     1       46
12      5.528   106     1       62
13      7.167   105     2       53
14      7.571   89      1       68
15      4.7     85      1       62
16      8.167   117     1       50
17      7.822   119     1       46
18      7.598   98      1       64
19      4       100     2       35
20      6.231   104     1       49
21      7.643   129     2       50
22      1.76    98      2       43
24      6.419   109     1       44
26      9.648   128     2       53
27      10.7    126     1       72
28      10.58   123     2       51
29      9.429   120     2       65
30      8       96      2       57
31      9.585   126     2       67
32      9.571   134     1       68
33      8.998   124     1       51
34      8.333   122     1       53
35      8.175   104     2       60
36      8       118     2       46
37      9.333   112     1       62
38      9.5     125     2       67
39      9.167   114     2       61
40      10.14   111     1       65
41      9.999   133     1       55
43      10.76   106     2       95
44      9.763   109     2       72
45      9.41    121     2       65
46      9.167   119     2       84
47      9.348   109     2       43
48      8.167   88      2       55
50      3.647   82      2       41
51      3.408   89      1       56
52      3.936   111     2       30
53      7.167   104     2       71
54      7.647   114     2       59
55      .53     81      2       16
56      6.173   74      2       42
57      7.295   101     2       72
58      7.295   123     1       65
59      8.938   124     1       55
60      7.882   96      1       32
61      8.353   118     2       68
62      5.062   102     2       45
63      8.175   121     2       65
64      8.235   115     2       56
65      7.588   113     2       71
68      7.647   112     2       47
69      5.237   79      1       28
71      7.825   96      2       48
72      7.333   95      1       64
74      9.167   100     2       90
76      7.996   106     2       56
77      8.714   101     1       65
78      7.833   102     1       63
79      4.885   88      2       52
80      7.998   118     1       74
83      3.82    89      2       56
84      5.936   88      1       73
85      9       93      1       65
86      9.5     122     1       88
87      6.057   102     2       52
88      6.057   101     1       61
89      6.938   117     2       39

The data from data216.dat contains information on 78 seventh-grade students. We want to know how well each of IQ score and self-concept score predicts GPA using least-squares regression. We also want to know which of these explanatory variables predicts GPA better. Give numerical measures that answer these questions. (Round your answers to three decimal places.)

(Regressor: IQ) R 2 =

(Regressor: Self-Concept) R 2 =

Which variable is the better predictor?

-IQ

-Self Concept

In: Math

A group of researchers at UTPA would like to determine reasons for low turnout in the...

A group of researchers at UTPA would like to determine reasons for low turnout in the RGV. They suspect that political trust in the RGV will be significantly different from the entire U.S. population (µ = 7.22). A group of 7 RGV residents’ scores are listed below. Compare this group of scores to the population to determine if there is a significant different (α = .05)

Participant

Political Trust

1

5

2

6

3

8

4

7

5

7

6

7

7

6

Will we need a one- or two-tailed hypothesis test?

State your null hypothesis

State your alternative hypothesis

Provide the SPSS output for your test and identify (circle or highlight) the t-obtained and the p-value

Did you reject or fail to reject the null hypothesis?

What can you conclude?

Calculate the 95 confidence interval for the sample mean

Calculate Cohens D

In: Math

I am stuck on the following problem please and it has to be in python! 1)...

I am stuck on the following problem please and it has to be in python!

1) Initially, create a list of the following elements and assign the list to a variable "thing".

"Mercy", "NYU", "SUNY", "CUNY"

2) print the list above

3) add your last name to the list

4) print the list

5) add the following elements as a nested list to the list:

"iPhone", "Android"

6) print the list

7) add the following list to the end of the list as elements:

["MIT", "CMU"]

8) print the list

9) add the following nested list to the third position of the list thing:

[30, 40+1]

10) print the list

11) delete "SUNY" from the list. # revised this question on 9/24 8:41pm!

12) print the list

13) add "Mercy" to the second last in the list (so "Mercy" should be in between "MIT" and "CMU"):

14) print the list

15) count "Mercy" in the list and print.

16) print the number of the top-level elements in the list.

17) In Step 10 above, explain why 40+1 is entered 41 to the list.


Challenge) Can we remove an element from a nested list? If yes, explain how in plain text. If not, explain why not

Challenge) Can we count each every element in a list, which may contain nested lists? If yes, explain how in plain text. If not, explain why not

In: Computer Science

How many electrons have to be added to 1 milligram metal sphere such that another +1C charge located 12 mm above the sphere will be able to hold that in the air?

 

5). How many electrons have to be added to 1 milligram metal sphere such that another +1C charge located 12 mm above the sphere will be able to hold that in the air?[Assume g=10m/s^2].

6). Two point charges, q₁= +13 nC and q₂= -7 nC, are located on the x-axis at x= 0 and x=9 m. What is the distance of ZERO electric field from the positive charge?

7). In a right angle, AB = 2 m, and angle ACB is 63.43 Degree. A point charge of 2* 23 nC is placed at point A and another point charge -3* 23 nC is placed at point C. Calculate the POTENTIAL at B

8). Two charges, one is at A with - 30.44 nC and other is at B with +9* 30.44 nC are seperated by 1 m. Find the distance AC in cm for which electric POTENTIAL at point C is zero. Point C is located on line AB.

In: Physics