Computer Science, asked by krishgadabrainlyin, 4 months ago

Write a menu driven program to display the pattern as per user's choice.
Pattern 1
ABCDE
ABCD
ABC
AB
Patter 2
B
LL
EEEE
For an incorrect option, an appropriate error message should be
displayed
[ICSE 2018]
the natter of a string as per the user's choice​

Answers

Answered by RuwaisnZaid
3

Explanation:

for i in range(4):

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

print("ABCDE",end=" ")

print()

for i in range(3):

for j in range(0,i+1):

if j==0:

print("B")

elif j==0 and j==1:

print("ll")

else:

print("EEEE")

Answered by sakshiprakash6
4

Explanation:

see the uploaded picture

Attachments:
Similar questions