\bold{Answer:}
Instructions written in code that a computer follows are called software programs.
Answer:
userInput = input("Please enter a string of words ")
userInput.split ()
for item in userInput.split ():
if item =="darn":
print("Censored")
break
else:
print(userInput)
Explanation:
Using Python programming language, the input function is used to receive the users input and save in a variable userInput
Then the .split method is used to convert the words into a list of words.
Using a for loop, the code checks for the word darn and prints censored if it exists else it prints the userInput
Answer:
False
Explanation:
The private member of a class is not accessible by using the Dot notation ,however the private member are those which are not accessible inside the class they are accessible outside the class .The public member are accessible inside the class so they are accessible by using the dot operator .
<u>Following are the example is given below in C++ Language </u>
#include<iostream> // header file
using namespace std;
class Rectangle
{
private:
double r; // private member
public:
double area()
{ return 3.14*r*r;
}
};
int main()
{
Rectangle r1;// creating the object
r1.r = 3.5;
double t= r1.area(); // calling
cout<<" Area is:"<<t;
return 0;
}
Output:
compile time error is generated
<u>The correct program to access the private member of class is given below </u>
#include<iostream> // header file
using namespace std;
class Rectangle
{
private:
double r; // private member
public:
double area()
{
r1=r;
double t2=3.14*r2*r2;
return(t2); // return the value
}
};
int main()
{
Rectangle r1;// creating the object
r1.r = 1.5;
double t= r1.area(); // calling
cout<<" Area is:"<<t;
return 0;
}
Therefore the given statement is False
Answer:
They make it easy to quickly see relationships between ideas.
Explanation:
A concept is an idea or a principle that could be used to understand an abstract notion. A conceptual note is one that makes the relationship between ideas easily discernible.
Without breaking much sweat or reading too deeply, the reader would find it easier to easily determine the relationship between ideas and how they relate to the subject matter. Conceptual notes can be taken on a laptop or paper.
Using the knowledge in computational language in C++ it is possible to write a code that Find the Average of the sum of prime numbers between 1 to any given number
<h3>Writting in C++ code:</h3>
<em />
<em>#include <iostream></em>
<em>using namespace std;</em>
<em>bool isPrime(int n){</em>
<em> for(int i = 2; i < n/2; i++){</em>
<em> if(n%i == 0){</em>
<em> return false;</em>
<em> }</em>
<em> }</em>
<em> return true;</em>
<em>}</em>
<em>int findPrimeSum(int n){</em>
<em> int sumVal = 0;</em>
<em> for(float i = 2; i <= n; i++){</em>
<em> if(isPrime(i))</em>
<em> sumVal += i;</em>
<em> }</em>
<em> return sumVal;</em>
<em>}</em>
<em>int main(){</em>
<em> int n = 15;</em>
<em> cout<<"The sum of prime number between 1 to "<<n<<" is "<<findPrimeSum(n);</em>
<em> return 0;</em>
<em>}</em>
See more about C++ code at brainly.com/question/19705654
#SPJ1