For C++ IDE
Write an C++ to check if a number is falling within the range j...k (inclusive). Ask the user to enter both ranges j, K and the number num you want to check. Output the suitable message based on the situation Within the range Outside the range Always prompt the user to enter a value using a suitable message.
For example (multiple runs)
Enter J - beginning of the range: 3
Enter K – end of the range: 15
Enter the value you want to check: 6
6 is within the range 3 to 15
Enter J - beginning of the range: 6
Enter K – end of the range: 15
Enter the value you want to check: 6
6 is within the range 6 to 15
Enter J - beginning of the range: 6
Enter K – end of the range: 15
Enter the value you want to check: 16
16 is outside the range 6 to 15
In: Computer Science
Red Red Wine is a wine bar that has been incorporated by Amie. It operates as a closelyheld corporation. The other shareholders are Amie’s brother and sister-in-law. Amie runs the day-to-day management of the wine bar, including managing the books and records. Amie’s brother and sister-in-law handle distribution, sales and marketing. After a few years, Amie starts to feel like she is doing the majority of the work and becomes bitter about the business relationship. She feels like she should be earning more money for the amount of work she does for the bar. Without discussing it with her brother and sister-in-law, Amie starts taking an additional draw from the wine bar every month in the amount of $1,000. She deposits the money into a business account for an LLC she created. On the books and records of the wine bar, Amie records this amount to the LLC as a “consultation fee.” Can Amie be held personally liable in this situation? If so, why?
In: Accounting
For each of the 3 causal questions (i, ii, and iii) answer the following (and label your answers clearly):
a. What is the outcome variable and what is the treatment?
b. Define the counterfactual outcomes Yi(0) and Yi(1)
c.What plausible causal channel(s) runs directly from the treatment to the outcome? In what direction would that push the results?
d.Is reverse causality a potential concern?
e.What are possible sources of selection and/or omitted variable bias in the raw comparison of outcomes and treatment status? Which way(s) would you expect the bias to go and why?
Questions
i.Many firms, particularly in poorer countries, are small and informal.Do informal firms grow more slowly than formal firms?
ii.Do students who come to class more get higher grades?
iii.Are countries whose governments are a larger part of the economy (ie G/GDP is larger) wealthier?
In: Economics
When I run this C++ program that asks the user to enter the population of 4 cities and produce the bar graph
- it runs but ends with a Debug Error - run time check failure 2 stack around variable population was corrupted - any help would be appreciated
#include <iostream>
using namespace std;
int main()
{
int population[4],k;
int i=1,n=5;
do
{
cout<<"Enter the population of city "<<i<<":"<<endl;
cin>>population[i];
if(population[i]<0)
cout<<"population cannot be negative,Reenter\n";
else
i++;
} while (i<n);
cout<<"\n\n\t\tPOPULATION\n\t (each * = 1000 people)\n";
for(int i=1;i<n;i++)
{
cout<<"\nCity "<<i<<":";
k=population[i]/1000;
for(int j=0;j<k;j++)
cout<<"*";
}
return 0;
}
In: Computer Science
Modify experiment 2 (below) such that the sensor value and data conversion to be shown on both LCD display and Serial Monitor
Here is modification of above program that fade LED light based upon sensed voltage level. Connect LED on pin 9 with current limiting resistor in series. Execute modified version of following program.
|
const int led = 9; void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin 0: int sensorValue = analogRead(A0); int dataConv = sensorValue*(256.0/1024); //write analog equvivalant data on led pin analogWrite(led, dataConv); // print out the value you read: Serial.println(sensorValue); Serial.println(dataConv); delay(1000); // delay in between reads for stability } |
Thanks for your help!
In: Computer Science
Question 7 (1 point)
A survey asked subjects, "Should the government increase its spending on health?" 317 of those 340 who responded said "yes."
Test, at level 0.05, that the majority of people in the population would say "yes" to the survey question.
The test is
Question 7 options:
|
a one-sample t test |
|
|
a one-sample z test |
|
|
a two-sample t test |
|
|
a two-sample z test |
Question 8 (1 point)
A survey asked subjects, "Should the government increase its spending on health?" 317 of those 340 who responded said "yes."
Test, at level 0.05, that the majority of people in the population would say "yes" to the survey question.
The p-value is
Question 8 options:
|
less than 0.001 |
|
|
between 0.001 and 0.01 |
|
|
between 0.01 and 0.05 |
|
|
greater than 0.05 |
Question 9 (1 point)
A survey asked subjects, "Should the government increase its spending on health?" 317 of those 340 who responded said "yes."
Test, at level 0.05, that the majority of people in the population would say "yes" to the survey question.
The conclusion of the test is
Question 9 options:
|
The data provide sufficient evidence that the majority of people in the population would say "yes" to the survey question. |
|
|
The data do not provide sufficient evidence that the majority of people in the population would say "yes" to the survey question. |
|
|
The data provide sufficient evidence that less than 50% of people in the population would say "yes" to the survey question. |
|
|
The data do not provide sufficient evidence that less than 50% of people in the population would say "yes" to the survey question. |
Question 10 (1 point)
A survey asked people who work full time, "How do you spend your time on a typical day?" 74% of 733 women and 55% of 1219 men reported spending some time on cooking and washing up.
What is a 95% confidence interval for the difference between the proportion of women and the proportion of men who spend some time on cooking and washing up during a typical day?
Question 10 options:
|
(0.158, 0.222) |
|
|
(0.154, 0.226) |
|
|
(0.134, 0.246) |
|
|
(0.147, 0.233) |
Question 11 (1 point)
A survey asked people who work full time, "How do you spend your time on a typical day?" 74% of 733 women and 55% of 1219 men reported spending some time on cooking and washing up.
Test, at significance level 0.05, that the proportion of women is greater than the proportion of men who spend some time on cooking and washing up during a typical day.
The test is
Question 11 options:
|
a one-sample t test |
|
|
a one-sample z test |
|
|
a two-sample t test |
|
|
a two-sample z test |
Question 12 (1 point)
A survey asked people who work full time, "How do you spend your time on a typical day?" 74% of 733 women and 55% of 1219 men reported spending some time on cooking and washing up.
Test, at significance level 0.05, that the proportion of women is greater than the proportion of men who spend some time on cooking and washing up during a typical day.
The p-value is
Question 12 options:
|
Less than 0.001 |
|
|
between 0.001 and 0.01 |
|
|
between 0.01 and 0.05 |
|
|
greater than 0.05 |
Question 13 (1 point)
A survey asked people who work full time, "How do you spend your time on a typical day?" 74% of 733 women and 55% of 1219 men reported spending some time on cooking and washing up.
Test, at significance level 0.05, that the proportion of women is greater than the proportion of men who spend some time on cooking and washing up during a typical day.
We can conclude that
Question 13 options:
|
The data provide sufficient evidence that the proportion of women is greater than the proportion of men who spend some time on cooking and washing up during a typical day. |
|
|
The data do not provide sufficient evidence that the proportion of women is greater than the proportion of men who spend some time on cooking and washing up during a typical day. |
In: Statistics and Probability
The accompanying data shows the weekly purchases of printers at a particular electronic store. Using α = 0.05, perform a chi-square test to determine if the number of printers sold per week follows a normal probability distribution. Note that x = 11.3 and s = 4.6.
| observed weekly purchases of printers |
| 8 |
| 15 |
| 12 |
| 18 |
| 11 |
| 15 |
| 5 |
| 8 |
| 2 |
| 2 |
| 16 |
| 7 |
| 17 |
| 16 |
| 11 |
| 12 |
| 16 |
| 13 |
| 13 |
| 5 |
| 11 |
| 9 |
| 11 |
| 8 |
| 16 |
| 8 |
| 8 |
| 17 |
| 6 |
| 20 |
| 12 |
| 3 |
| 9 |
| 11 |
| 7 |
| 14 |
| 11 |
| 13 |
| 14 |
| 11 |
| 11 |
| 6 |
| 18 |
| 20 |
Use the intervals below to calculate the chi-square test statistic, χ2
|
Interval 1: |
z |
≤ |
−1.0 |
||
|---|---|---|---|---|---|
|
Interval 2: |
−1.0 |
< |
z |
≤ |
0 |
|
Interval 3: |
0 |
< |
z |
≤ |
1.0 |
|
Interval 4: |
1.0 |
< |
z |
Calculate the test statistic
χ2 =
(Round to two decimal places as needed.)
Determine the p-value.
p-value =
(Round to three decimal places as needed.)
In: Statistics and Probability
You can choose one of these two topics: 1) Topic 1: Imagine CPP is organizing a course-trip to Spain (considering the circumstances, this is a lot of imagination, but the idea is very real, as it was something I started organizing this fall and was very excited about). :-( Suggest THREE cities that should be included in the trip and write one of two sentences about the educational purpose of including this city. (Something I could use in my syllabus-plan to get this course-trip approved. Do not use only the cities mentioned in this last module. These are some ideas: Barcelona, Tarragona, Mérida, Segovia, Sevilla, Granada, Córdoba, Burgos, León, Santiago de Compostela, etc. Include an image of something we would visit. 2) Topic 2. If you have visited Spain, please, share your experience with us. Share some images.
In: Psychology
Lorena likes to play golf. How many times per year she plays
depends on two things: (1) the price of playing a round of golf,
and (2) Lorena’s income and the cost of other types of
entertainment—in particular, how much it costs to see a movie
instead of playing golf.
The three demand schedules in the table below show how many rounds
of golf per year Lorena will demand at each price under three
different scenarios.
| Scenario: | D1 | D2 | D3 |
| Income per year: | $50,000 | $50,000 | $70,000 |
| Movie Ticket Price: | $9 | $11 | $11 |
| Rounds of Golf: | Quantity Demanded | Quantity Demanded | Quantity Demanded |
| Price = $55 | 15 | 10 | 15 |
| Price = $40 | 25 | 15 | 30 |
| Price = $25 | 40 | 20 | 50 |
a. Using the data under D1 and
D2, calculate the cross elasticity of Lorena’s demand
for golf at all three prices. (To do this, apply the
midpoints approach to the cross elasticity of
demand.)
Instructions: Round your answer to two decimal
places. If you are entering any
negative numbers be sure to include a negative sign (-) in front of
those numbers.
Cross elasticity of Lorena’s demand at the price of $55 =
Instructions: Round your answer to two decimal
places. If you are entering any
negative numbers be sure to include a negative sign (-) in front of
those numbers.
Cross elasticity of Lorena’s demand at the price of $40 =
Instructions: Round your answer to two decimal
places. If you are entering any
negative numbers be sure to include a negative sign (-) in front of
those numbers.
Cross elasticity of Lorena’s demand at the price of $25 =
Is the cross elasticity the same at all three prices? (Click to
select)NoYes
Are movies and golf substitute goods, complementary goods, or
independent goods? (Click to select)complementary goodssubstitute
goodsindependent goods
b. Using the data under D2 and
D3, calculate the income elasticity of Lorena’s demand
for golf at all three prices. (To do this, apply the midpoints
approach to the income elasticity of demand.)
Instructions: Round your answer to two decimal
places. If you are entering any
negative numbers be sure to include a negative sign (-) in front of
those numbers.
Income elasticity of Lorena’s demand at the price of $55 =
Instructions: Round your answer to two decimal
places. If you are entering any
negative numbers be sure to include a negative sign (-) in front of
those numbers.
Income elasticity of Lorena’s demand at the price of $40 =
Instructions: Round your answer to two decimal
places. If you are entering any
negative numbers be sure to include a negative sign (-) in front of
those numbers.
Income elasticity of Lorena’s demand at the price of $25 =
Is the income elasticity the same at all three prices? (Click to
select)NoYes
Is golf an inferior good? (Click to select)NoYes it is (Click to
select)a normal goodan inferior good.
In: Economics
Two identical point charges (q = +3.00 x 10-6 C) are fixed at opposite corners of a square whose sides have a length of 0.580 m. A test charge (q0 = -3.00 x 10-8 C), with a mass of 7.50 x 10-8 kg, is released from rest at one of the corners of the square. Determine the speed of the test charge when it reaches the center of the square.
In: Physics