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
It promotes problem solving approaches and thinking skills
Answer:
true
Explanation:
a while loop is a condition-controlled loop. While loops continue no matter what under a certain condition, unless you insert the keyword <em>break.</em>
One example in python is this:
while x > y:
<em>pass</em>
The keyword to break a while loop may vary depending on the coding language you are using.
<u>Tip</u> The pass keyword allows a no error contact between loop and the terminal. Pass in a nutshell is almost as if saying nothing at all, but just leaving the condition blank. We only use pass because it prevents errors instead of no value.
They'll post condolences messages etc which means many people will discover their business if they are looking for posts mentioning the deceased's name on social media.
Answer:
a. Object cannot be converted to Person
Explanation:
This program demonstrates polymorphism.
e.g., a Student IS a Person therefore you can call m() with a Student as well as a Person object.
The same goes for GraduateStudent.
However, and Object is not a Person, so the last call fails. This can be deducted by the type checking that happens at compile time.