FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
programminginpython.com/patterns/PyramidPattern.py at master · anilkumarreddyn/programminginpython.com · GitHub
anilkumarreddyn
/
programminginpython.com
Public
forked from
avinashn/programminginpython.com
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
programminginpython.com
/
patterns
/
PyramidPattern.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (13 loc) · 376 Bytes
Breadcrumbs
programminginpython.com
/
patterns
/
PyramidPattern.py
Copy path
File metadata and controls
16 lines (13 loc) · 376 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
__author__
=
'Avinash'
# Print a Triangle
# Range of the triangle
num
=
int
(
input
(
"Enter the range:
\t
"
))
# i loop for range(height) of the triangle
# first j loop for printing space ' '
# second j loop for printing stars '*'
for
i
in
range
(
num
):
for
j
in
range
((
num
-
i
)
-
1
):
print
(
end
=
" "
)
for
j
in
range
(
i
+
1
):
print
(
"*"
,
end
=
" "
)
print
()
Back
|
FazBrowse Home
|
New Git URL