'Triangle Tessellation Code has an extra space and does not print on the same Line
height = int(input())
columns = int(input())
rows = int(input())
for a in range(height):
for b in range(a, height):
print(" ", end="")
for b in range(a):
print("*", end="")
for b in range(a+1):
print("*", end="")
print()
This is my code, when I run said code, it prints a triangle with an extra space. My code can print triangles in columns but cannot print them side by side. I have tried many things to get rid of the extra space and print them side by side, but nothing has worked. Can someone help?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
