Hollow rectangle in python assignment expert
Hollow Rectangle - 2 This Program name is Hollow Rectangle - 2. Write a Python program to Hollow Rectangle - 2 The below link contains Hollow Rectangle - 2 question, explanation and test cases https://drive.google.com/file/d/1nWuk5uhqVJKhOJbg9IaBoW8S8FUrNSbX/view?usp=sharing We need exact output when the code was run
Learn more about our help with Assignments: Python Answer to Question #218778 in Python for balaHollow Rectangle - 2 Write a program to print a rectangle pattern of The first line of input is an integer In the given example, 3 rows and 10 columns.Therefore, the output should be +----------+ | | | | | | +----------+ Sample Input 1 3 10 Sample Output 1 +----------+ | | | | | | +----------+ Sample Input 2 5 10 Sample Output 2 +----------+ | | | | | | | | | | +----------+
Learn more about our help with Assignments: Python View Discussion Improve Article Save Article View Discussion Improve Article Save Article Hollow rectangle star pattern :The task is print below hollow pattern of given dimension. ******************** * * * * * * * * ******************** Explanation:
for (i = 1; i < = rows; i++)
for (j = 1; j < = columns; j++)
C++
C
Java
Python3
C#
PHP
Javascript
Output: ******************** * * * * * * * * ******************** Time Complexity: O(m * n), where m and n represents the given inputs. Hollow square star pattern :******** * * * * * * * * * * * * ******** Explanation:
if i == 1 or i == N or j == 1 or j == N
C++
C
Java
Python3
C#
PHP
Javascript
Output: ******** ** ** * * * * * ** * * ** * * * * * ** ** ******** Time Complexity: O(n2), where n represents the given input. |