Discover new knowledge and insights with IDNLearn.com's extensive Q&A database. Our platform is designed to provide quick and accurate answers to any questions you may have.

EASY QUESTION EASY POINTS!!!!! WILL MARK BRAINLIEST!!!!!
*****This is the programming language Python.*****
Question:
Output the following figure with asterisks. Do not add spaces after the last character in each line.
*****
* *
*****
* *
*****
Note: Whitespace (blank spaces / blank lines) matters; make sure your whitespace exactly matches the expected output.


Sagot :

The program is an illustration of loops and conditional statements

Loops

Loops are used to perform repetitive operations.

Conditional statement

Conditional statements are used to make decisions

The python program

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:

https://brainly.com/question/19344465