Answer:
3% inflation rise. No correct cpi option
Explanation:
Consumer Price Index(CPI) is calculated by the Bureau of Economic Analysis and Statistics of a country monthly and annually.
Consumer Price Index(CPI) is used for measuring the changes in the price level of consumer goods and services purchased by households.
Calculating the consumer price index; price in 1964= $1.25, today price= $5.0.
Therefore, consumer price index= Price in today- price in 1964÷ price in 1964,.
Consumer Price index(CPI)= $(5-1.25)/1.25 = 3.75/1.25 = 3 Percent price inflation rise.
For the first cpi; 112-80/80= 0.4 percent( not equal to the 3 Percent inflation rise).
For the second cpi: 141.6-60/60= 1.36 Percent inflation rise(not equal to the 3 Percent inflation rise).
For the third CPI: 126.4-75/75 =0.68 percent inflation rise[not equal to the 3 Percent inflation rise].
For the third CPI: 108.5-90/90=0.21 percent inflation rise(not equal to 3 Percent inflation rise)
Therefore, none of the options are right.
Answer:
The function is as follows:
void readAndConvert(){
int n; string symbol,name;
cin>>n;
cin>>symbol;
cin.ignore();
getline (cin,name);
vector<string> trades;
string trade;
for (int inps = 0; inps < n; inps++){
getline (cin,trade);
trades.push_back(trade);}
cout<<name<<" ("<<symbol<<")"<<endl;
for (int itr = 0; itr < n; itr++){
string splittrade[3]; int k = 0;
for(int j=0;j<trades.at(itr).length();j++){
splittrade[k] += trades.at(itr)[j];
if(trades.at(itr)[j] == ' '){
k++; }}
cout<<splittrade[2]<<": "<<floor(stod(splittrade[1]) * stod(splittrade[0]))<<endl; }
}
Explanation:
See attachment for complete program where comments are used to explain each line
This is for Python
name = 'Joe'
print(f'My name is {name}')
This is called string formatting. Using f before the text. This is another way
name = 'Joe'
print('My name is', Joe)
But I found that string formatting is cleaner and much more useful
Answer:
The solution code is written in Python 3
- count = 0
- sum = 0
-
- num = input("Enter a number: ")
-
- while(num != ''):
- sum += float(num)
- count += 1
- num = input("Enter a number: ")
-
- print("Sum : " + str(sum))
- print("Average: " + str(sum / count))
Explanation:
Firstly, we declare two variables count and sum to hold the number of input number and the total of the input number, respectively (Line 1-2)
Next, we prompt user to input the first number (Line 4). While the num is not ' ' (This means it is not "Enter" key), accumulate the num to sum variable and increment count by one (Line 6-8) and then prompt the user to input the next number (Line 9).
At the end, display the sum and average using print function (Line 11 -12).
Answer:
1) 402.7 grams. This estimate is called the sample mean.
2) (399.11, 406.29)
3) The 99 percent confidence limits is between 399.11 grams and 406.29 grams.
I am 99% sure that the value lies between 399.11 grams and 406.29 grams.
Explanation:
sample size (n) = 40, the mean weight (x)= 402.7 grams and the standard deviation (σ)=8.8 grams
1) The point estimated mean weight of the population is 402.7 grams. This estimate is called the sample mean.
2) c = 99% = 0.99
α = 1 - 0.99 = 0.01
.
The z score of 0.005 corresponds with the z score of 0.495 (0.5 - 0.005).
.
The margin of error (e) = 
The confidence interval = x ± e = 402.7 ± 3.59 = (399.11, 406.29)
3) The 99 percent confidence limits is between 399.11 grams and 406.29 grams.
I am 99% sure that the value lies between 399.11 grams and 406.29 grams.