Question

Question 29 10 pts (SHORT ANSWER) Define a function named display_pattern that is a void function with no parameters. When th

python programming

0 0
Add a comment Improve this question Transcribed image text
Answer #1

===========

CODE
===========

# Below code is written in python 3,

# for successful output please execute in python3

# display_pattern function creation

def display_pattern():

               # for loop for 2 rows
               for x in range(2):

                              # nested for loop for 3 columns
                              for y in range(3):

                                             # printing * to console with same line as end as empty
                                             print("*", end="")                                          

                              # new line for console output
                              print()

if __name__== '__main__':

               # calling the display_pattern method
               display_pattern()

===================

OUTPUT

===================

C:\Users\kamireck\AppData\Local\Programs Python Python37\python.exe C:/Users/kamireck/PycharmProjects/untitled/Pattern.py

Add a comment
Know the answer?
Add Answer to:
python programming Question 29 10 pts (SHORT ANSWER) Define a function named display_pattern that is a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT