USING C++:
Consider the precedence levels of the relational, logical, and arithmetic operators of the PySub language to be as follows (NOTE: 5 has highest precedence and 0 lowest):
| 5 | *, /, % |
| 4 | +, - |
| 3 | <, <=, >, >=, !=, == |
| 2 | not |
| 1 | and |
| 0 | or |
1. Infix-Postfix Conversion and Evaluation with Logical and Relational operators – Convert the following infix expression to a postfix expression and evaluate the result (assume that true=1 and false=0). Provide both the postfix expression and the result.
In: Computer Science
Please show the work, I have looked at this problem a couple of different ways and can't figure out how the answer comes to be.
Daniel allocates his budget of $24 per week among three goods. Use the following table of the marginal utilities for Good A, Good B, and Good C to answer the questions below QA MUA QB MUB QC MUC 1 50 1 75 1 25 2 40 2 60 2 20 3 30 3 40 3 15 4 20 4 30 4 10 5 15 5 20 5 7.5
| Qa | MUa | Qb | MUb | Qc | MUc |
| 1 | 50 | 1 | 75 | 1 | 25 |
| 2 | 40 | 2 | 60 | 2 | 20 |
| 3 | 30 | 3 | 40 | 3 | 15 |
| 4 | 20 | 4 | 30 | 4 | 10 |
| 5 | 15 | 5 | 20 | 5 | 7.5 |
a. If the price of A is $2, the price of B is $3, and the price of C is $1, how much of each does Daniel purchase in equilibrium? SHOW YOUR CALCULATIONS!
b. If the price of A rises to $4 while the other prices and Daniel’s budget remain unchanged, how much of each does he purchase in equilibrium?
In: Economics
Let ?1=(1,0,1,0) ?2=(0,−1,1,−1) ?3=(1,1,1,1) be linearly independent vectors in ℝ4.
a. Apply the Gram-Schmidt algorithm to orthonormalise the vectors
{?1,?2,?3} of vectors {?1,?2,?3}.
b. Find a vector ?4 such that {?1,?2,?3,?4} is an orthonormal basis
for ℝ4 (where ℝ4 is the Euclidean space, that is, the
inner product is the dot product).
In: Advanced Math
| Ligand | Number of donor atoms |
| Cl− | 1 |
| F− | 1 |
| Br− | 1 |
| CO32− | 2 |
| CN− | 1 |
| gly− | 2 |
| EDTA4− | 6 |
| NH3 | 1 |
| H2O | 1 |
| CO | 1 |
What is the coordination number for each of the following complexes or compounds?
[Fe(CN)4(CO)2]2−
[Pb(EDTA)]2−
[Zn(NH3)4]2+
Na[Au(CN)2]
Enter the coordination numbers, in the order that the complexes are listed, as four integers separated by commas (e.g., 1,2,3,4).
In: Chemistry
Consider a binomial experiment with n=.14 with and p= 0.01.
a. Compute F(0) (to 4 decimals).
b. Compute f(2) (to 4 decimals).
c. Compute P(x< or equal to 1) (to 4 decimals).
d. Compute P(x >or equal to 4) (to 4 decimals).
e. Compute E(x) (to 1 decimal).
f. Compute Var(x) and mean .
|
(to 2 decimals) |
|
(to 2 decimals) |
In: Statistics and Probability
Write a program using a Scanner that asks the user for a number n between 1 and 9 (inclusive). The program prints a triangle with 2n - 1 rows. The first row contains only the square of 1, and it is right-justified. The second row contains the square of 2 followed by the square of 1, and is right justified. Subsequent rows include the squares of 3, 2, and 1, and then 4, 3, 2 and 1, and so forth until n rows are printed. Starting at row n + 1, the squares between (n - 1) to 1 are printed, again right justified. Row n + 2 prints the squares between (n -2) to 1.
Assuming the user enters 4, the program prints the following triangle of 7 rows to the console
1
4 1
9 4 1
16 9 4 1
9 4 1
4 1
1
If the user enters 7, the following 13-row triangle is printed
1
4 1
9 4 1
16 9 4 1
25 16 9 4 1
36 25 16 9 4 1
49 36 25 16 9 4 1
36 25 16 9 4 1
25 16 9 4 1
16 9 4 1
9 4 1
4 1
1
Notes
Hint
Don't think of the output as a triangle. Think of it as two rectangular tables: one of the first n rows, the second of the last (n-1) rows.
Within each table, some cells are three spaces, some are one space and two digits, and some are two spaces and one digit.
Start by printing an entire table with each cell its appropriate square value. Then figure out how to replace the cells that should "empty" with three spaces instead of a number.
Finally, figure out how to print the one-digit numbers as two spaces and one digit, and the two-digit numbers as one space and two digits.
Grading Elements
In: Computer Science
|
MEN |
|||
|
Time (minutes and seconds) |
Exercise per Week |
Favorite Exercise |
|
|
1 |
1:48 |
6 |
Running |
|
2 |
1:11 |
4 |
Walking |
|
3 |
0:32 |
2 |
Push up |
|
4 |
0:47 |
3 |
Jumping Jacks |
|
5 |
0:18 |
0 |
n/a |
|
WOMEN |
|||
|
Time (minutes and seconds) |
Exercise per week |
Favorite Exercise |
|
|
1 |
0:35 |
2 |
Squats |
|
2 |
1:20 |
3 |
Elliptical machine |
|
3 |
1:14 |
5 |
Squats |
|
4 |
1:09 |
0 |
n/a |
STEP 3: You will analyze your data and compute the following statistics for each group:
1) The Mean and standard deviation of the number of seconds the subject stayed balanced
2) The Median number of days per week exercised
3) The Mode of the favorite exercise
4) The 90% confidence interval of the mean
In: Statistics and Probability
| Gender | |||
| Hair color | male | female | total |
| Blonde | 0 | 4 | 4 |
| Brunette | 4 | 4 | 8 |
| Red | 0 | 1 | 1 |
| Black | 5 | 1 | 6 |
| Other | 2 | 1 | 3 |
| total | 11 | 11 | 22 |
Put formulas and answers in yellow shaded cells.
| Question | ||
| 1 | P(black hair) = | |
| 2 | P(blonde hair) = | |
| 3 | P(male AND brunette hair) = | |
| 4 | P(red OR black) = | |
| 5 | P(male OR brunette) = | |
1) The probability of having black hair.
2) The probability of having blonde hair.
3) The probability of being male and having brunette hair.
4) The probability of having red or black hair.
5) The probability of being male or having brunette hair.
In: Statistics and Probability
1. A deed conveys: 1) title of the property from the seller to the buyer 2) identification of the buyer and the seller 3) both of the above 4) none of the above
2. In verification of a loan, the lender: 1) will have to verify the existence and worth of other assets 2) will require at least a two-year history of income from all sources 3) will verify the credit standing of the applicant 4) all the above 5) both (1) and (3)
3. The FHA requires that a self-employed borrower must have been self-employed for at least two years. 1) True 2) False
4. Foreclosure is a process that: 1) returns the property to a borrower when the loan is paid off 2) is consistent in all states as required by federal law 3) is exercised by a buyer of the property 4) none of the above
In: Finance
Problem 1: A statistician for a drug company wishes to determine
whether short-term memory scores are affected by the type of
medication in hyperactive children. Sixty hyperactive children (30
boys and 30 girls) were randomly assigned to receive either Cylert
or Ritalin (two kinds of amphetamines which are CNS stimulants).
Their short-term memory was tested on a 20-point scale (where 0 =
no memory and 20 = perfect memory).
Boys Cylert: 12, 10, 13, 10, 9, 12, 13, 10, 11, 12
Boys Placebo: 5, 6, 7, 6, 4, 5, 6, 7, 5, 7
Boys Ritalin: 3, 2, 5, 6, 1, 4, 2, 6, 1, 5
Girls Cylert: 5, 6, 2, 4, 3, 2, 4, 6, 2, 4
Girls Placebo: 4, 6, 7, 6, 5, 4, 5, 6, 7, 7
Girls Ritalin: 12, 9, 14, 13, 9, 12, 8, 15, 12, 11
1. The sum of squares for gender are
| .42 |
| 40.83 |
| 593.43 |
|
141.90 2. The sum of squares for Problem 1 drug levels are
3. The sum of squares for the interaction in Problem 1 are
|
In: Statistics and Probability