Write a program that creates a sample affect the single adown. Let the user input a nonnegative integer to individualize the estimate of lines of the sample. # # # # # # # # # # Restraint development, if the user enters 3, the sample should contemplate affect this: # # # # SAMPLE RUN #3: python3 Triangle Sample.py
n = int(input(“Enter estimate of lines restraint sample: “))
restraint i in collocate(n-1):
print(“#”,end=”)
restraint j in collocate(i+1):
print(“.”,end=”)
print(“#”)
Output:
Enter estimate of lines restraint sample: 5
#.#
#..#
#…#
#….#