0% found this document useful (0 votes)
8 views

Computer Project

This document contains a Python code for generating mandala artforms using loops. The code takes the number of lines as input and generates a symmetrical pattern of slashes, backslashes, and the letters "SNE" in the center. It uses loops and conditional statements to create the pattern for any given number of lines. The output for sample inputs of 3, 9, and 31 lines is displayed, showing how the pattern is generated systematically.

Uploaded by

sroy191006
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Computer Project

This document contains a Python code for generating mandala artforms using loops. The code takes the number of lines as input and generates a symmetrical pattern of slashes, backslashes, and the letters "SNE" in the center. It uses loops and conditional statements to create the pattern for any given number of lines. The output for sample inputs of 3, 9, and 31 lines is displayed, showing how the pattern is generated systematically.

Uploaded by

sroy191006
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ART

INTEGRATED
LEARNING
USE OF LOOPS IN GENERATING MANDALA
ARTFORMS OF LADAKH

Snehangshu Roy
Class XI J (A)
Roll: 41
PAGE 1
PAGE 2
Code for The Mandala Art Output

n=int(input("Enter number of lines: ")) Enter number of lines: 3


snehangshu='SNEHANGSHU' \*/
x=n//2*3 |*|SNE|*|
y=3 /*\
for i in range(1,n//2+1):
for h in range(x):
print(end=' ') Enter number of lines: 9
x-=3 \*/
for j in range(2*i-1): \*//#\\*/
if j%2==0: \*//#\\*//#\\*/
print('\*/',end='') \*//#\\*//#\\*//#\\*/
else: |*||*||*||*|SNE|*||*||*||*|
print('/#\\',end='') /*\\#//*\\#//*\\#//*\
print() /*\\#//*\\#//*\
for i in range(n): /*\\#//*\
if i==n//2: /*\
print(snehangshu[:3],end='')
continue
print('|*|',end='')
Enter number of lines: 11
print()
\*/
for i in range(n//2,0,-1):
\*//#\\*/
for h in range(y):
\*//#\\*//#\\*/
print(end=' ')
\*//#\\*//#\\*//#\\*/
y+=3
\*//#\\*//#\\*//#\\*//#\\*/
for j in range(2*i-1):
|*||*||*||*||*|SNE|*||*||*||*||*|
if j%2==0:
/*\\#//*\\#//*\\#//*\\#//*\
print('/*\\',end='')
/*\\#//*\\#//*\\#//*\
else:
/*\\#//*\\#//*\
print('\#/',end='')
/*\\#//*\
print()
/*\

PAGE 3
Main Output

Enter number of lines: 31

\*/
\*//#\\*/
\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*//#\\*/
|*||*||*||*||*||*||*||*||*||*||*||*||*||*||*|SNE|*||*||*||*||*||*||*||*||*||*||*||*||*||*||*|
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\\#//*\
/*\\#//*\\#//*\
/*\\#//*\
/*\

PAGE 4

You might also like