From 545614efb5c3879d89cdab386e64cff33bc20d5e Mon Sep 17 00:00:00 2001 From: vismitap <47056243+vismitap@users.noreply.github.com> Date: Wed, 9 Oct 2019 23:53:56 +0530 Subject: [PATCH] a python program to print a square pattern with "*" This program takes the input from user about the length of square and prints "*" accordingly. --- Patterns/square | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Patterns/square diff --git a/Patterns/square b/Patterns/square new file mode 100644 index 0000000..31b1b91 --- /dev/null +++ b/Patterns/square @@ -0,0 +1,6 @@ +#taking input from user +n=int(input("Enter the num of lines in square: ")) +for i in range(n): #i is for rows + for j in range(n): #j is for columns + print("*",end=" ") + print()