forked from SushmitaY/mca101_2017
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.iso_triangle.py
More file actions
28 lines (21 loc) · 739 Bytes
/
2.iso_triangle.py
File metadata and controls
28 lines (21 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def isoTriangle(s):
'''
objective: to draw isosceles triangle
approach: printing multiple lines of symbols that this function has received as an argument
parameter: -> s : the sysmbol that is to be used in triangle
'''
print (' ',s)
print (' ',s,s,s)
print (' ',s,s,s,s,s)
print ( s,s,s,s,s,s,s)
def main():
'''
objective: to take symbol input from user and draw isosceles triangle using that symbol
approach: using function isoTriangle and passing the given symbol as parameter
'''
symbol = input("Enter a symbol you want to print : ")
isoTriangle(symbol)
print ('end of main')
if __name__ == '__main__':
main()
print('end of program')