Computer Science, asked by sahilsinghpradhan444, 9 months ago

write a python code for the above diagram​

Attachments:

Answers

Answered by bhuvaneshwarinathan
1

Answer:

It is known as Floyd's triangle.

Explanation:

rows = int(input("enter rows:"))

number = 1

i = 1

while(i <= rows):

   j = 1

   while(j <= i):        

       print(number, end = '  ')

       number = number + 1

       j = j + 1

   i = i + 1

   print()

       

Answered by adhvaith2007
0

Answer: Open your Start menu and choose Python (command line). You should get a prompt that looks like >>>. ...

At the prompt, type the following. Use a single quote at the start and the end — it's beside the Enter key: ...

Press the Enter key. Python runs the code you typed.

Explanation:

Similar questions