I m a beginner in python, how can I write a # pyramid pattern using python?
Input: 5
output:
# # # # # # # # # # # # # # #
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
kushwanth
Yes, you can write a # pyramid pattern using python , any number of times by using the following code:
n=int(input())
for i in range(1,n+1):
for j in range(i):
print(‘#’,end=’ ‘)
print(‘\n’)
Any other information regarding python error’s handling best practices read that.