English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write a program to display. AA B A B C A B C D A B C D E - Computer Science

Advertisements
Advertisements

Question

Write a program to display.

A
A B
A B C
A B C D
A B C D E

Short Note

Solution

class display_pattern():
 {
   for i in range(1, 6):
     for j in range(65, 65 + i):
          print(chr(j), end=" ")
      print()

 display_pattern()
 }
shaalaa.com
Control Structure
  Is there an error in this question or solution?
Chapter 6: Control Structures - Evaluation [Page 88]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 6 Control Structures
Evaluation | Q 1. | Page 88
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×