Questions
Consider the light passing from a means of refractive index n1 to another of index n2....

Consider the light passing from a means of refractive index n1 to another of index n2. Use the Fermat principle to minimize travel time and                                                                                     deduce the law of refraction: n1sen (θ1) = n2sen (θ2).

In: Physics

A cannon directed straight upward launches a ball with an initial speed v. The ball reaches...

A cannon directed straight upward launches a ball with an initial speed v. The ball reaches a maximum height h in a time t. Then, the same cannon is used to launch a second ball straight upward at a speed 2v. In terms of h and t, what is the maximum height the second ball reaches and how long does it take to reach that height? Ignore any effects of air resistance.

In: Physics

Electron transfer translocates protons from the mitochondrial matrix to the external medium, establishing a pH gradient...

Electron transfer translocates protons from the mitochondrial matrix to the external medium, establishing a pH gradient across the inner membrane (outside more acidic than inside). The tendency of protons to diffuse back into the matrix is the driving force for ATP synthesis by ATP synthase. During oxidative phosphorylation by a suspension of mitochondria in a medium of pH 7.4, the pH of the matrix has been measured as 7.7.

(a) Calculate [H+ ] in the external medium and in the matrix under these conditions.

(b) What is the outside-to-inside ratio of [H+ ]? Comment on the energy inherent in this concentration difference (just the energy from the concentration gradient, not the electrochemical potential.

(c) Calculate the number of protons in a respiring liver mitochondrion, assuming its inner matrix compartment is a sphere of diameter 1.5 microns. (volume of a sphere is 4/3 π r^3)

(d) From these data, is the concentration gradient sufficient to generate ATP from ADP and Pi? If not, suggest how the necessary energy for synthesis of ATP from ADP and phosphate arises.

In: Chemistry

inserting a node after given node. DLL::DLL(int x){ // constructor, initializes a list with one new...

inserting a node after given node.

DLL::DLL(int x){ // constructor, initializes a list with one new node with data x
   DNode *n = new DNode (x);
   first = n;
   last = n;
   size=1;
}

DNode::DNode( int x){
   data = x;
   next = NULL;
   prev = NULL;
}

void DLL::addFirst(int x) {
   DNode* tmp = new DNode(x);
   first = tmp;
   last = first;
}

void DLL::insertAt(int ind, int x) {
   int i = 0;
   DNode *tmp = first;
   DNode *tmp2;
   while(i < ind && tmp != NULL) {
       i += 1;
       tmp2 = tmp;
       tmp = tmp->next;
   }

   if (tmp != NULL) {
       DNode *tmp3 = new DNode(x);
       tmp3->next = tmp;
       tmp->prev = tmp3;
       tmp2->next = tmp3;
       tmp3->prev = tmp2;
   }

}

command to get out put:

codelist.addFirst(0);
    codelist.printList();
    codelist.insertAt(1,1);
    codelist.printList();
    codelist.insertAt(2,3);
    codelist.printList();
    codelist.insertAt(2,2);
    codelist.printList();
    codelist.push(4);
    codelist.printList();
    codelist.insertAt(2,42);
    codelist.printList();

desired output:

0,

0, 1,

0, 1, 3,

0, 1, 2, 3,

0, 1, 2, 3, 4,

0, 1, 42, 2, 3, 4,

actual output:

0,
0,
0,
0,
0, 4,
0, 4,

In: Computer Science

Please code this in C In this project, we shall simulate the operations of an ATM...

Please code this in C

In this project, we shall simulate the operations of an ATM machine.

Suppose you’re in charge of this simulation and here is a scenario of what is required to do:

The customer will be assigned a random number for his/her balance.

First, the customer is prompted to enter his personal identification number pin (for this case study, we test only if this pin is formed by 4 digits! otherwise, a message like “Invalid PIN, try again . . .” will be displayed) and the user is re-prompted to enter the pin. The customer is given three chances to enter his pin. If he/she fails during the three trials you display a message like “Sorry you can’t continue, contact your bank for assistance!”

If the pin is correct (formed by 4 digits), then the system will ask the customer for the receipt ( 1 for YES and 2 for NO ) and a menu will be displayed containing five possible options to choose from: Fast Cash, Deposit, Withdraw, Balance and Get Card Back.

Here is the explanation of each of the 5 options:

Get Card Back: Display the message “Goodbye! “and exit the program.

Fast Cash: Let the customer choosing the amount of cash from a menu similar to the following:

Press:

1 --> $20.00                $40.00 <-- 2

3 --> $80.00                $100.00 <-- 4

Withdraw: Prompt the user for the amount of money he/she would like to withdraw and make the sure that he/she has enough money for that!

Deposit: Prompt the customer for the amount of deposit.

Balance: Just display the amount of money the customer has.

Don’t forget to print the receipt if the customer wants one.

Sample execution: bolded text represents the user entry

Virtual Bank at West

                              WELCOME

Enter Pin: 245

                        Invalid PIN, Re-enter Pin: 5487

(clear screen )

                        Receipt y or Y -> Yes             No <- n or N  

                        Enter choice: N          

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

                                    Enter your choice: 4

                                    (Clear screen)

                        Your Balance is : $124.3

1 -> Another Transaction                    Get Card Back <- 2   

Enter your choice: 1

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

                                                Enter your choice: 2

(Clear screen )

Enter amount (enter 0 to cancel): 300.00

Sorry not enough balance

Enter amount (enter 0 to cancel): 30.00

Take your cash…

(Clear screen)

Your Balance is: $124.32

1 -> Another Transaction                    Get Card Back <- 2   

Enter your choice: 1

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

Enter your choice: 8

Invalid Entry

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

Enter your choice: 5

(Clear screen)

THANK FOR USING OUR VIRTUAL BANK SYSTEM

GOODBYE. . .

In: Computer Science

A 63.0 kg ice hockey goalie, originally at rest, catches a 0.150 kg hockey puck slapped...

A 63.0 kg ice hockey goalie, originally at rest, catches a 0.150 kg hockey puck slapped at him at a velocity of 28.0 m/s. Suppose the goalie and the ice puck have an elastic collision and the puck is reflected back in the direction from which it came. What would their final velocities (in m/s) be in this case? (Assume the original direction of the ice puck toward the goalie is in the positive direction. Indicate the direction with the sign of your answer.)

In: Physics

Why is emergency management software so important? How important is software  to emergency managers?

Why is emergency management software so important? How important is software  to emergency managers?

In: Computer Science

Write a program that creates three vector objects IN C++. Fill the first two objects with...

Write a program that creates three vector objects IN C++. Fill the first two objects with 25 floating-point numbers using a for loop as follows: 1. fill the first vector object with the loop counter value; 2. fill the second vector object with the loop counter value squared; 3. finally, write a for loop that adds the corresponding elements in the first two vectors, and puts the result in the corresponding element of the third vector. Display all three vectors using the format “for counter; element + element = element”.

In: Computer Science

Python Programming Question 1. Implement the median-of-three method for selecting a pivot value as a modification...

Python Programming Question

1. Implement the median-of-three method for selecting a pivot value as a modification to quickSort (name this function

mo3_quickSort). Prepare test cases for your mo3_quickSort .function

QuickSort function:

def quickSort(alist):
quickSortHelper(alist,0,len(alist)-1)

def quickSortHelper(alist,first,last):
if first

splitpoint = partition(alist,first,last)

quickSortHelper(alist,first,splitpoint-1)
quickSortHelper(alist,splitpoint+1,last)


def partition(alist,first,last):
pivotvalue = alist[first]

leftmark = first+1
rightmark = last

done = False
while not done:

while leftmark <= rightmark and alist[leftmark] <= pivotvalue:
leftmark = leftmark + 1

while alist[rightmark] >= pivotvalue and rightmark >= leftmark:
rightmark = rightmark -1

if rightmark < leftmark:
done = True
else:
temp = alist[leftmark]
alist[leftmark] = alist[rightmark]
alist[rightmark] = temp

temp = alist[first]
alist[first] = alist[rightmark]
alist[rightmark] = temp


return rightmark

alist = [54,26,93,17,77,31,44,55,20]
quickSort(alist)
print(alist)

2. Prepare and run an experiment to verify the following hypothesis.

Canonic quickSort is as fast as mo3_quickSort when processing large lists of unsorted integers.

In: Computer Science

masses m1 and m2 are stacked together on a level surface that has friction. The blocks...

masses m1 and m2 are stacked together on a level surface that has friction. The blocks are accelerating together to the right. There is static friction between the two blocks. Analyze the forces on each block

In: Physics

1. Sketch the area under the standard normal curve over the indicated interval and find the...

1. Sketch the area under the standard normal curve over the indicated interval and find the specified area. (Round your answer to four decimal places.)

The area to the right of z = 1.50 is _________

2. Sketch the area under the standard normal curve over the indicated interval and find the specified area. (Round your answer to four decimal places.)

The area to the left of  z = −1.33  is ________

3. Sketch the area under the standard normal curve over the indicated interval and find the specified area. (Round your answer to four decimal places.)

The area between  z = −2.25 and z = 1.41 is ________

4.Sketch the area under the standard normal curve over the indicated interval and find the specified area. (Round your answer to four decimal places.)

The area between z = −2.48 and z = −1.80 is ________

5. Assume that x has a normal distribution with the specified mean and standard deviation. Find the indicated probability. (Round your answer to four decimal places.)

μ = 5.0; σ = 2.4.

P(3 ≤ x ≤ 6) = ________

6. Assume that x has a normal distribution with the specified mean and standard deviation. Find the indicated probability. (Round your answer to four decimal places.)

μ = 109; σ = 12

P(x ≥ 90) = ________

In: Math

What is the pH of a 203 mL sample of 3.601 M acetic acid (CH3COOH) (Ka...

What is the pH of a 203 mL sample of 3.601 M acetic acid (CH3COOH) (Ka = 1.8 x 10-5)?

In: Chemistry

An educational psychologist is examining response times to an on-screen stimulus. The researcher believes there might...

An educational psychologist is examining response times to an on-screen stimulus. The researcher believes there might be a weak effect from age, but expects a more pronounced effect for different color contrasts. She decides to examine a black on white (B/W) combination compared to 2 alternatives: red on white (R/W) and yellow on blue (Y/B). Here is the data for response times (in milliseconds):

Color Scheme
B/W R/W Y/B
Age 16–17 10
26
16
22
11
36
31
22
20
19
31
7
43
16
20
23
7
20
33
43
3
22
24
19
18–19 26
18
25
13
34
15
17
21
17
35
37
39
47
36
15
19
30
30
44
22
35
35
27
22
20–21 20
29
29
18
23
25
41
26
28
19
25
18
40
30
26
28
16
38
27
25
42
42
35
39

Using MS Excel, conduct a 2-way ANOVA with α=0.05α=0.05. Fill in the summary table:  P-values should be accurate to 4 decimal places and all other values accurate to 3 decimal places.

Source SS df MS F-ratio P-value Partial η2η2
Age (AA) 2
Color (BB) 2
Interaction (A×B)(A×B) 4
Error 63


In: Math

Hassan Limited uses the FIFO method in its process costing system. The data given relates to...

Hassan Limited uses the FIFO method in its process costing system. The data given relates to the most recent month of operations for one of the processing departments:
Opening units
400
Units started into production
3,000
Closing units
300
Material
Conversion
Percentage completion of opening inventory
80%
40%
Percentage completion of closing inventory
70%
60%
The cost of beginning inventory was Rs.10,040 of which Rs.7,120 was for materials and the remainder was for conversion cost. The costs added during the month amounted to Rs.132,730 of which Rs.76,048 was for materials and the remainder was for conversion cost.   
Required:   
1. Compute the equivalent units of material and of conversion in the ending inventory. (2 Mark)
2. Compute the equivalent units of material and of conversion that were required to complete the beginning inventory. (2 Mark)
3. Determine the number of units started and completed during the month. (1 Mark)
4. Compute the cost per equivalent unit for materials and for conversion and the total cost per equivalent unit. (1 Mark)
5. Determine the cost of units transferred out.
6. Determine the cost of ending inventory

In: Accounting

The table lists the sugar content of two types of apples from three different orchards. At...

The table lists the sugar content of two types of apples from three different orchards. At , test the claim that the sugar content of the apples and the orchard where they were grown are not related. Sugar Content Orchard 1 Orchard 2 Orchard 3 Apple Type 1 4 2 6 Apple Type 2 28 10 14

In: Math