Half Pyramid - 3
This Program name is Half Pyramid - 3. Write a Python program to Half Pyramid - 3
The below link contains Half Pyramid - 3 question, explanation and test cases
https://drive.google.com/file/d/13c3-3LSzTDuA0PqNWXiMAZ1LoT-FBd_Q/view?usp=sharing
We need exact output when the code was run
N = int(input())
K = int(input())
output = ''
for i in range(1, K + 1):
for j in range(i):
output += str(N) + ' '
N += 1
output += '\n'
print(output)
Comments
Leave a comment