Please answer the following questions about the pictured
circuit.
A circuit with two batteries, and two loops (three loops if you count the outer loop). The central section has resistor of 5-ohms. The left loop has a 10-V battery with its positive terminal facing up and 5-ohm resistor. The right loop has a 15_V battery with its positive terminal facing down and the third 5-ohm resistor. The current through the 15.0-V battery is I15 = 8 3 A = 2.667 A. What is the current (magnitude and direction) through the 10.0-V battery? (Please enter your numerical answer in decimal form; WebAssign will not accept a fraction.) I10 =__________ A, up/down
through the 10.0-V battery What is the current (magnitude and direction) through the central 5.00-Ω resistor in the circuit (the 5.00-Ω resistor that runs vertically)? (Please enter your numerical answer in decimal form; WebAssign will not accept a fraction.)
I5 = ___________A, up/down through the central 5.00-Ω resistor
In: Physics
JAVA- How do I edit the following code as minimally as possible to add this method for calculating BMI?
BMI Method:
public static double calculateBMI(int height, int weight)
{
double BMI = (((double) weight) * 0.453592d) / ((((double) height)
* 0.0254) * (((double) height) * 0.0254));
Format f = new DecimalFormat("##.######");
return (f.format(BMI));
}
Code:
import java.text.DecimalFormat;
import java.util.Scanner;
public class test2 {
public static void main(String[] args) {
DecimalFormat f = new DecimalFormat("##.0");
Scanner reader = new Scanner(System.in);
System.out.printf("%10s %15s %12s %8s %8s %8s %9s %8s %n", "Name", "Heart Rate", "Resp Rate", "Height", "Weight", "BMI", "BP", "Score");
while(reader.hasNext()){
String name = reader.next();
int heartRate = reader.nextInt();
int respiratoryRate = reader.nextInt();
int height = reader.nextInt();
int weight = reader.nextInt();
int systolicPressure = reader.nextInt();
int diastolicPressure = reader.nextInt();
double BMI =
(((double)weight)*0.453592d)/((((double)height)*0.0254)*(((double)height)*0.0254));
if(heartRate == 0 ||respiratoryRate == 0 ||height == 0 ||weight
== 0 ||systolicPressure == 0 || diastolicPressure== 0){
System.out.print("Invalid record!");
}
else{
System.out.printf("%10s", name);
int score = 1;
if(heartRate>=60 && heartRate<=100){
score++;
System.out.printf("%16s", heartRate);
}
else{
System.out.printf("%16s", "!!" +heartRate);
}
if(respiratoryRate>=12 &&
respiratoryRate<=18){
score++;
System.out.printf("%13s", respiratoryRate);
}
else{
System.out.printf("%13s", "!!" +respiratoryRate);
}
System.out.printf("%9s", height);
System.out.printf("%9s", weight);
if(BMI>=18.5 && BMI <=25.0){
System.out.printf("%9s", f.format(BMI));
}
else{
System.out.printf("%9s", "!!" + f.format(BMI));
}
if((systolicPressure>=90 && systolicPressure<=120)
&& (diastolicPressure>=60 &&
diastolicPressure<=80)){
score++;
System.out.printf("%11s", systolicPressure + "/" +
diastolicPressure + "\t");
}
else{
System.out.printf("%11s", "!!" + systolicPressure + "/" +
diastolicPressure + "\t");
}
for(int i=0;i<score;i++)
System.out.print("*");
}
System.out.println();
}
}
}
In: Computer Science
7 and 8 go together
7. Two groups of subjects participated in an experiment designed to test the effect of frustration on aggression. The experimental group of 40 subjects received a frustrating puzzle to solve, while the control group of 70 subjects received a very easy version of the same puzzle. Levels of aggression was measured for both groups where higher scores are indicative of higher levels of aggression. The experimental group (high frustration) had a mean aggression score of 4.0 and a standard deviation of 2.0. The control group (no frustration) had a mean aggression score of 3.0 and a standard deviation of 1.5. Using these results, formulate a research and null hypothesis and test the null hypothesis at the .01 level of significance.
8. Assume you collected larger samples of individuals to test your null hypothesis in question #7. Specifically, the sample sizes increased to 200 subjects in each group. Do your results and conclusions change from the test of the smaller sample sizes? (You must show your work).
In: Statistics and Probability
The following table gives information on the amount of sugar (in grams) and the calorie count in one serving of a sample of 13 varieties of Kellogg's cereal. Sugar (grams) 5 15 12 11 8 6 7 2 7 14 20 5 13 Calories 130 200 160 110 130 80 210 120 120 190 190 110 120 Find the predictive regression equation of the number of calories on the amount of sugar. Carry out all calculations exactly, and round the final answers to three decimal places.
In: Statistics and Probability
(Java)Run length encoding is a simple form of data compression. It replaces long sequences of a repeated value with one occurrence of the value and a count of how many times to repeat it. This works reasonably well when there are lots of long repeats such as in black and white images. To avoid having to represent non-repeated runs with a count of 1 and the value, a special value is often used to indicate a run and everything else is just treated as a simple value. For this exercise you will decompress one line of input at at time assuming the line was compressed according to the following:
The newline characters are passed through uncompressed even when there are repeated blank lines. When a run of n>=3 repeated characters, c, is detected where c is NOT a digit, the run will be replaced with #nc. When a run of n>=3 repeated characters, c, is detected where c IS a digit, the run will be replaced with #n#c. The extra # is needed to avoid confusing the repeated digit c with the last digit of the run count. All other characters (i.e. runs of just 1 or 2 characters) are passed through unmodified. Assume the uncompressed input does not contain the symbol '#'. This assumption can be eliminated. You might think about how you would do it.
Some examples:
abc decompresses to abc
#3ab#4c decompresses to aaabcccc
abc12#14#3 decompresses to abc1233333333333333
Your decoder can assume the input was properly compressed, i.e. no need for error checking. Your program must include a public static method decompress() that takes one parameter, a String, that is the line to be decompressed. The method returns the decompressed String. Write Decoder.java to answer this question.
In: Computer Science
A slot machine is a gambling device which allows a user to insert money and pull a lever (or push a button) and displays a set of random images. Design a Python program which simulates a "free" slot machine which displays a random combination of 3 of the following items (as text): Cherries, Oranges, Plums, Melons, and Bells
If none of the items match, the user wins nothing.
If only two of the items match, the user wins $5
If all three items match, the user wins $10
If the user matches 3 Bells, the user wins $50
In: Computer Science
An air transport association surveys business travelers to develop quality ratings for transatlantic gateway airports. The maximum possible rating is 10. Suppose a simple random sample of 50 business travelers is selected and each traveler is asked to provide a rating for a certain airport. The ratings obtained from the sample of 50 business travelers follow.
| 6 | 4 | 5 | 8 | 7 | 6 | 6 | 3 | 3 | 8 |
| 10 | 4 | 8 | 7 | 8 | 7 | 5 | 9 | 4 | 8 |
| 4 | 3 | 8 | 5 | 6 | 4 | 4 | 4 | 8 | 4 |
| 5 | 7 | 2 | 5 | 9 | 9 | 8 | 4 | 8 | 9 |
| 9 | 5 | 9 | 7 | 8 | 3 | 10 | 8 | 9 | 6 |
Develop a 95% confidence interval estimate of the population mean rating for this airport. (Round your answers to two decimal places.)
? to ?
In: Math
The International Air Transport Association surveys business travelers to develop quality ratings for transatlantic gateway airports. The maximum possible rating is 10. Suppose a simple random sample of 50 business travelers is selected and each traveler is asked to provide a rating for the Miami International Airport. The ratings obtained from the sample of 50 business travelers follow.
| 6 | 4 | 6 | 8 | 7 | 7 | 6 | 3 | 3 | 8 |
| 10 | 4 | 8 | 7 | 8 | 7 | 5 | 9 | 5 | 8 |
| 4 | 3 | 8 | 5 | 5 | 4 | 4 | 4 | 8 | 4 |
| 5 | 6 | 2 | 5 | 9 | 9 | 8 | 4 | 8 | 9 |
| 9 | 5 | 9 | 7 | 8 | 3 | 10 | 8 | 9 |
6 |
Develop a 95% confidence interval estimate of the population mean rating for Miami. (Round your answers to two decimal places.)
In: Math
A warden is interested in the ability of two different violence reduction programs to reduce violent interactions in her prison. To test for differences, the warden randomizes two groups implementing one program to each group. The amount of violent interactions per inmate is presented below. Using α = .05, perform an independent sample t test of significance.
|
Program A |
Program B |
|
9 |
8 |
|
7 |
5 |
|
7 |
8 |
|
5 |
3 |
|
8 |
4 |
|
7 |
9 |
|
6 |
6 |
|
7 |
7 |
|
8 |
7 |
|
3 |
2 |
What is the null hypothesis? What is the research hypothesis (two-tailed t-test)? Calculate t. . What are the degrees of freedom? . Are the results significant, why or why not?
In: Statistics and Probability
How many bit strings of length fifteen
a) Contain at least four 0s?
b) Contain at most four 0s?
c) Contain exactly four 0s?
d) Begin with four 0s?
In: Advanced Math