Question: Write a python program that displays a rectangular matrix of random characters. You can think of a matrix as a table or a grid Create
Write a python program that displays a rectangular matrix of random characters. You can think of a matrix as a table or a grid Create a function named randChar that generates and returns a random alphabet character in the range ['a, 'z]. Recall that characters are from the ASCIl table, and they all have an equivalent integer representation. You can convert from an integer to a chr using casting: chr(107) this expression evaluates to the Char value -k. Define a main function that will prompt the user to enter the width and height of the matrix. Validate that both dimensions of the matrix are positive integers less than or equal to 30. Display an error message otherwise If the user input is valid, then use nested loops to iterate over the dimensions of the matrix and display a single random alphabet character for each position of the matrix. The characters should be separated by spaces. Make sure to use the end-thnamed argument. Here is some example output for a 3 x 4 matrix: Matzix of Random Chars Enter the heighes Entez another number: 4 dmyz snth
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
