Pattern 1

Beginner Problems Patterns Easy
  • Fun Fact: Though simple, generating patterns like this one is a foundational skill for graphical programming and game development
  • Many retro, text-based games like rogue or Dwarf Fortress use text characters to represent the game world, and modern games use more advanced versions of these same principles to create their levels and worlds! Spefically, being able to generate a repetitive pattern like this can be crucial in designing background graphics, creating tile-based games, designing user interfaces and even in certain testing scenarios

Given an integer n. You need to recreate the pattern given below for any value of N. Let's say for N = 5, the pattern should look like as below:


*****

*****

*****

*****

*****


Print the pattern in the function given to you.

Constraints

  • 1 <= n <= 20

Company Tags

TCS Cognizant Accenture Infosys Capgemini Wipro IBM HCL Tech Mahindra MindTree