Answer:
Healthy plant growth follows from sufficient water.
Contrapositive: If water is insufficient, then there isn't healthy plant growth
Increased availability of information is a necessary condition for further technological advances
Contrapositive: Absence of further technological advances implies decreased availability of information.
Errors were introduced only if there was a modification of the program.
Contrapositive: If there wasn't any modification of the program then error was not introduced into the program
Fuel savings implies good insulation or storm windows throughout.
Contrapositive: The absence of good insulation or storm windows throughout implies that there is no fuel savings.
Explanation:
A contrapositive statement is formed from a conditional statement as we can see from the answers above.
In a contrapositive statement, we just interchange the hypothesis and the conclusion of the inverse statement.
This implies that, when the converse of the statement is true, then the inverse of the statement is also logically true.
Answer:
<em>C++</em>
////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
int n = 1;
while (n != 0) {
cout<<"Enter an integer, the input ends if it is 0: ";
cin>>n;
v.push_back(n);
}
cout<<endl;
///////////////////////////////////////////////////////////
int sum = 0;
int num_positives = 0, num_negatives = 0;
for (int i=0; i<v.size()-1; i++) {
if (v[i] > 0)
++num_positives;
else
++num_negatives;
sum = sum + v[i];
}
//////////////////////////////////////////////////////////
cout<<"The number of positives is "<<num_positives<<endl;
cout<<"The number of negatives is "<<num_negatives<<endl;
cout<<"The total is "<<sum<<endl;
cout<<"The average is "<<(float)sum/(v.size()-1);
///////////////////////////////////////////////////////////
return 0;
}
Mr. Jones put 1.2 bags of potting soul around each tree. To solve this problem divide the number of bags by the number of plants.
Hope this helps!
Answer:
The output is "<class 'str'> ".
Explanation:
In the given python code a print() function is defined. Inside this function, a type() function will use, in which a numeric value is passed in the double quotes (" ") as a function parameter. Double quotes are normally used for print value as a message but in this code, value is not printed because we use the type() function.
- The type() function Returns the parameter class type of the argument(object).
- This function is used for debugging. In this function, we pass a single parameter that will return the type of given object.