FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
programminginpython.com/patterns/Pattern-R.py at master · dedire229/programminginpython.com · GitHub
dedire229
/
programminginpython.com
Public
forked from
avinashn/programminginpython.com
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
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
/
Pattern-R.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (34 loc) · 1012 Bytes
Breadcrumbs
programminginpython.com
/
patterns
/
Pattern-R.py
Copy path
File metadata and controls
47 lines (34 loc) · 1012 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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
__author__
=
'Avinash'
# Python3 program to print alphabet pattern R
# * * * * * *
# * *
# * *
# * *
# * * * * * * *
# * *
# * *
# * *
def
print_pattern
(
n
):
for
row
in
range
(
n
):
for
column
in
range
(
n
):
if
(
# first row
(
row
==
0
and
column
!=
0
and
column
!=
n
-
1
)
or
# first column
(
column
==
0
and
row
!=
0
)
or
# middle row
(
row
==
n
//
2
and
column
!=
n
-
1
)
or
# last column
(
column
==
n
-
1
and
row
<
n
//
2
and
row
!=
0
)
or
# R tail
(
row
==
column
and
row
>=
n
//
2
)
):
print
(
"*"
,
end
=
" "
)
else
:
print
(
" "
,
end
=
" "
)
print
()
size
=
int
(
input
(
"Enter any size:
\t
"
))
if
size
<
8
:
print
(
"Enter a size minumin of 8"
)
else
:
print_pattern
(
size
)
Back
|
FazBrowse Home
|
New Git URL