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
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
4
Explanation:
see the uploaded picture
Attachments:
Similar questions
Math,
3 months ago
Math,
3 months ago
Science,
6 months ago
Math,
6 months ago
Computer Science,
10 months ago
Computer Science,
10 months ago