Write a python script to read a symbol and print the patterns shown below.
# # #
# # #
# # #
#
# #
# # #
Answers
Answered by
1
Answer:
it shows python script
hope this helps you have a nice day ahead
Answered by
3
Pattern 1:-
# # #
# # #
# # #
Còde :-
for i in range(1,4):
print("# "*3)
Explanation :-
We have to create a pattern with 3 rows and 3 columns. For this we have to create a loop which will run 3 times for printing # symbol in one row. Now multiply # symbol with 3 as we want to print # 3 times in a row.
Pattern 2 :-
#
# #
# # #
Còde :-
for i in range (1,4):
print("# " * i)
Explanation :-
In this pattern, we have to print # symbols in rows in increasing order where # should be printed in 3 rows. For this we have created a loop which will run from 1 to 3 and multiplying it by # symbol will give us the required pattern.
Similar questions