Answer to Question #301532 in Python for Vini

Question #301532

Given a integer N as a string number and K as input, write a program to print a number pyramid of K rows



Input


The first line of input is an integer N


The second line of input is an integer K



If N=10,K=5


The output should be


10


11 12


13 14 15


16 17 18 19


20 21 22 23 24



1
Expert's answer
2022-02-23T06:24:24-0500
start = int(input())
for k in range(int(input())):
    print(*[start + i for i in range(k + 1)])
    start += k + 1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS