Problem of the day
Current streak:
1 day
Longest streak:
5 days
Less
More
def alphaRamp(n: int) -> None:
# Write your solution from here.
ch="A"
for i in range(1,n+1):
for j in range(i):
print(chr(ord(ch)+i-1),end = " ")
print()
pass
def nBinaryTriangle(n: int) -> None:
# Write your solution here.
s=1
for i in range(0,n):
if(i%2!=0):
s=0
else:
for j in range(i+1):
print(s,end=" ")
s=1-s