The program is an illustration of loops and conditional statements
<h3>
Loops</h3>
Loops are used to perform repetitive operations.
<h3>
Conditional statement</h3>
Conditional statements are used to make decisions
<h3>The python program</h3>
The program in Python, where comments are used to explain each line is as follows.
#The following is repeated 5 times; i.e. the rows
for i in range(5):
#The following is repeated 5 times; i.e. the columns
for j in range(5):
#For rows 2 and 5
if i == 1 or i== 3:
#For columns 1 and 5
if j == 0 or j == 4:
#This prints *
print('*',end='')
#For other columns
else:
#This prints an empty space
print('',end=' ')
#For other rows
else:
#This prints *
print('*',end='')
#This prints a new line
print()
Read more about loops at:
brainly.com/question/19344465
Answer:
"this" keyword representing the class object itself.
Explanation:
Object-oriented programming concept emphasizes on using blueprints representing the structure of a data collection type to continuously create an instance of that data structure. The instance of that object is called a class object. It is used in database management systems to populate the database.
Functions defined in the class objects are called methods and are used specifically by the class instance to modify the data content of the class object defined.
When a member of a class is referenced in the class, it can be accessed with the "this" keyword. At an instance of the class object, the variable holding the object should be called to get the class content because of the "this" keyword binding the instance of the object to the method.
Answer:
The function in python is as follows
def is_present(num,list):
stat = False
if num in list:
stat = True
return bool(stat)
Explanation:
This defines the function
def is_present(num,list):
This initializes a boolean variable to false
stat = False
If the integer number is present in the list
if num in list:
This boolean variable is updated to true
stat = True
This returns true or false
return bool(stat)
Answer:
In opp friend function is a function that gives the same access to private and protected data. It is declared in class that is granting access.
Explanation:
#include<iostream.h>
using namespace std;
class Sum
{
int a, b, add;
public:
void input()
{
cout << "Enter the value of l and m:";
cin >> l>>m; taking input from users
}
friend void add(sum &t);
void display()
{
cout << "The sum is :" << z;
}
};
void add(sum & p)
{
p.add = p.a + p.b;
}
int main()
{
sum p1;
p1.input();
add(p1);
p1.display();
return false;
if(display==5)
{
return true; //true is returned if sum is equal to 5
}
else //if they are not the same
{
return false;
}
}
Answer:
A
Explanation:
There's levels to it. As someone who use to play watchdogs anything is considered hacking.