Computer Science, asked by kurreynaveen2, 3 months ago

Write python script to print given pattern.

2

4 6

8 10 12

14 16 18 20​

Answers

Answered by vijayakumarchinthala
0

Answer:

a=2

for i in range(1,5):

   for j in range(i):

       print(a,end="\t")

       a+=2

   print()

Explanation:

1. a variable is created and 2 data is assigned

2. nested for loop is used

3. data in variable a is printed and incremented by 2 and use escape sequence \t (tab space)

4. print function used in parent for which keeps the cursor in the next line

Similar questions