Computer Science, asked by snehiljha5, 10 months ago

5
54
543
5432
54321
Write a program to make above pattern by Python programing.
Note: Do not use function.

Answers

Answered by mindfulmaisel
5

PYTHON PROGRAM

Answer:

n=5

for i in range(n,0,-1):

   for j in range (n,i-1,-1):

       print(j,end="")

   print()

output:

5

54

543

5432

54321

Explanation:

For loop is used in this program to get the output of the following. There are two for loops are executed in this program in order to print the values in a exact sequence.

In the first step we initial "n" is equal to 5 and then we assign for loop named "i" for range(n,0,-1) this statement runs loop over until the condition gets satisfied.

In second step we assign another for loop inside a first loop and then the loop runs until the two conditions gets satisfied.

TO KNOW MORE ON PYTHON PROGRAM

1.Write a Python program to find person is senior citizen or not input page​

https://brainly.in/question/12150015

2.A python program to input a single digit number and print its 3 digit number created as (n(n+1)(n+2)). for example if you input 5 then the output should be 567.

https://brainly.in/question/9846913

Answered by razanishar7864u0
3

Answer:

s.o.p = system.out.print

s.o.pln. = system.out.println

Attachments:
Similar questions