Lab - Validate all of the row in the puzzle.
//
// - Use this code as a start of the program.
// - Catch all duplicate entries in each row.
// - Catch any numbers that are not 1 - 9.
// - Display an error msg for each error found.
// - At end, display a msg stating how many errors were
found.
//=====================================================================
import java.util.*;
public class Lab_ValidateAllRows
{
public static void main (String[] args)
{
int puzzle[][] =
{
{ 1, 2, 3, 4, 5,
6, 7, 8, 9 },
{ 4, 5, 6, 7, 8,
9, 1, 2, 3 },
{ 7, 8, 9, 1, 2,
3, 4, 5, 6 },
{ 2, 3, 4, 5,
6, 7, 8, 9, 1 },
{ 5, 6, 7, 8, 9,
1, 2, 3, 4 },
{ 8, 9, 1, 2, 3,
4, 5, 6, 7 },
{ 3, 4, 5, 6,
7, 8, 9, 1, 2 },
{ 6, 7, 8, 9, 1,
2, 3, 4, 5 },
{ 9, 1, 2, 3, 4,
5, 6, 7, 8 }
};
int row, col, i;
for (row = 0; row < 9;
row++)
{
for (col = 0;
col < 9; col++)
{
}
}
}
}
In: Computer Science
Using the calculated wavelength, plot a graph of 1/lambda vs. (1/2^2 - 1/N^2). Determine the Rydberg constant from the slope of the line. Please write answer as neatly and large as possible, clearly demonstrating all steps.
Computed wavelengths for each spectral line;
Yellow = 5.89x10^-7m
Violet = 4.38x10^-7m
Blue = 4.91x10^-7m
Red = 6.78x10^-7m
In: Physics
Using the calculated wavelength, plot a graph of 1/lambda vs. (1/2^2 - 1/N^2). Determine the Rydberg constant from the slope of the line. Please demonstrate using Excel only how to plot the graph portion and demonstrate clearly on paper how to determine the Rydberg constant from the slope of the line (showing all steps in detail)
Computed wavelengths for each spectral line;
Yellow = 5.89x10^-7m
Violet = 4.38x10^-7m
Blue = 4.91x10^-7m
Red = 6.78x10^-7m
In: Physics
Schmutz Auto Wash provides car washes. Its production function
is ? = 2?1/2(? - 1)1/2
where ? is cars washed per day, ? is daily hours of labor input,
and ? is daily usage of capital inputs. The price of a unit of
capital input is $48. The price of a unit of labor input is $16. In
the short run, Schmutz has 4 units of capital input installed (so ?
= 4).
a). Find Schmutz’s short run daily total cost function, short run daily variable cost function, and short run daily fixed costs.
b). Find Schmutz’s short run marginal cost function, short run average variable cost function, and short run total cost function.
c). Suppose that the market for car washes is perfectly competitive and the going market price of a car wash is ?. Find Schmutz’s short run daily supply function, including its shutdown price.
d). Find Schmutz’s short run daily quantity supplied, producer surplus, and profit if ? = 40.
In: Economics
Schmutz Auto Wash provides car washes. Its production function
is ? = 2?1/2(? - 1)1/2
where ? is cars washed per day, ? is daily hours of labor input,
and ? is daily usage of capital inputs. The price of a unit of
capital input is $48. The price of a unit of labor input is $16. In
the short run, Schmutz has four units of capital input installed
(so ? = 4).
a). Find Schmutz’s short run daily total cost function, short run daily variable cost function, and short run daily fixed costs.
b). Find Schmutz’s short run marginal cost function, short run average variable cost function, and short run total cost function.
c). Suppose that the market for car washes is perfectly competitive and the going market price of a car wash is ?. Find Schmutz’s short run daily supply function, including its shutdown price.
d). Find Schmutz’s profit in the short run if ? = 40.
In: Economics
| Year Cost | Project 1 | Project 2 | Project 2 | |||
| ($1 Mil) | ($1.5 Mil) | ($2 Mil) | ||||
| 1 | $300,000 | $900,000 | $300,000 | |||
| 2 | $300,000 | $500,000 | $400,000 | |||
| 3 | $300,000 | $200,000 | $600,000 | |||
| 4 | $300,000 | $200,000 | $600,000 | |||
| 5 | $300,000 | $0 | $1,000,000 |
Cost of Capital is 8%. Acceptable payback period is 3 1/2 years. Acceptable discounted payback period is 4 1/2 years. Based on the above data, calculate payback, discounted payback, net present value, internal rate of return and modified rate of return.
Based on the above data, calculate payback, discounted payback, net present value, internal rate of return and modified rate of return for each project.
In: Finance
Do only in C# (Not in C++ or C )
Minimum number of operations to convert array M to array N by adding an integer into a subarray
Given two arrays M and N , the task is to find the minimum number of operations in which the array M can be converted into array N where each operation consists of adding an integer K into a subarray from L to R.
M= {3, 7, 1, 4, 1, 2}, N = {3, 7, 3, 6, 3, 2}
Output: 1
In the above given example only one operation is required to
convert from M to N: L = 3, R = 5 and K = 2
Array after the following operation:
Index 0: M[0] = 3, N[0] = 3
Index 1: M[1] = 7, N[1] = 7
Index 2: M[2] = 1 + 2 = 3, N[2] = 3
Index 3: M[3] = 4 + 2 = 6, N[3] = 6
Index 4: M[4] = 1 + 2 = 3, N[4] = 3
Index 5: M[5] = 2, N[5] = 2
M= {1, 1, 1, 1, 1},N = {1, 2, 1, 3, 1}
Output: 2
In the above given example only one operation is required to
convert from M to N –
Operation 1: Add 1 to L = 2 to R = 2
Operation 2: Add 2 to L = 4 to R = 4
In: Computer Science
Write a program called distance_square.c that reads an integer n from standard input, and prints an nxn pattern of integers. Each integer is the minimum number of steps required to reach the centre of the square. Steps can only be up, down, left or right (no diagonal movement). the question should be allowed to use only while loop
4 3 2 3 4 3 2 1 2 3 2 1 0 1 2 3 2 1 2 3 4 3 2 3 4
Observing the example above, each integer represents the minimum number of steps required to reach the centre of the square. For example, the top left corner contains the integer 4. The centre of the square can be reached in 4 steps (right, right, down, down).
You can assume n is odd and >= 3.
Make your program match the examples below exactly.
This exercise is designed to give you practice with while loops, if statements and some mathematical operators. Do not use arrays for this exercise!
Note: you are not permitted to use an array in this exercise. and you are suppose to use while loop only!!
./distance_square Enter square size: 3 2 1 2 1 0 1 2 1 2 ./distance_square Enter square size: 9 8 7 6 5 4 5 6 7 8 7 6 5 4 3 4 5 6 7 6 5 4 3 2 3 4 5 6 5 4 3 2 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5 4 3 2 1 2 3 4 5 6 5 4 3 2 3 4 5 6 7 6 5 4 3 4 5 6 7 8 7 6 5 4 5 6 7 8 ./distance_square Enter square size: 15 14 13 12 11 10 9 8 7 8 9 10 11 12 13 14 13 12 11 10 9 8 7 6 7 8 9 10 11 12 13 12 11 10 9 8 7 6 5 6 7 8 9 10 11 12 11 10 9 8 7 6 5 4 5 6 7 8 9 10 11 10 9 8 7 6 5 4 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 4 5 6 7 8 9 10 11 10 9 8 7 6 5 4 5 6 7 8 9 10 11 12 11 10 9 8 7 6 5 6 7 8 9 10 11 12 13 12 11 10 9 8 7 6 7 8 9 10 11 12 13 14 13 12 11 10 9 8 7 8 9 10 11 12 13 14
In: Computer Science
“Does the amount of stress differ for three groups of employees?”
Group 1 employees work a morning/day shift. Group 2 employees work the day/evening shift, and Group 3 employees work the night shift.
The null hypothesis is that there is no difference between groups. Test this in SPSS and provide your conclusion.
Write your response to the research question, using the SPSS analysis as support.
| Shift | Stress |
| 1 | 7 |
| 1 | 7 |
| 1 | 6 |
| 1 | 9 |
| 1 | 8 |
| 1 | 7 |
| 1 | 6 |
| 1 | 7 |
| 1 | 8 |
| 1 | 9 |
| 2 | 5 |
| 2 | 6 |
| 2 | 3 |
| 2 | 5 |
| 2 | 4 |
| 2 | 6 |
| 2 | 5 |
| 2 | 4 |
| 2 | 5 |
| 2 | 5 |
| 2 | 6 |
| 2 | 7 |
| 2 | 6 |
| 3 | 1 |
| 3 | 3 |
| 3 | 4 |
| 3 | 3 |
| 3 | 1 |
| 3 | 1 |
| 3 | 2 |
| 3 | 6 |
| 3 | 5 |
| 3 | 4 |
| 3 | 3 |
| 3 | 4 |
| 3 | 5 |
In: Statistics and Probability
In: Biology