Question: Write a program that takes from user a positive integer n (n=26), print out a letter triangle whose height is of the given integer shown

Write a program that takes from user a positive integer n (n=26), print out a letter triangle whose height is of the given integer shown as samples below. Assume n is always a positive integer no greater than 26, no need for validation of n. 4 Hint: a) You can use orde) to find the ASCII code of a letter. e.g., ord('a') returns 974 b) You can use chrt) to find the letter correspond to ASCII code. e.g. chr(98) returns 'b't Example output 1: >>> your input n? 34 Lake a ab aabc a Example output 2: >>> your input n? 74 a ale a ab abc abcd abcde a abcdef aabcdefg a a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
