Question: Question 2: [12.5 marks] Write a Python program that prompts the user to input a positive number n (the number should be validated) and print

 Question 2: [12.5 marks] Write a Python program that prompts the

Question 2: [12.5 marks] Write a Python program that prompts the user to input a positive number n (the number should be validated) and print an identity matrix of the desired size, n. N.B: If the entered number was float, it should be converted to integer. Expected Output: Enter a positive number: 3 Wrong entry! Enter a positive number: 4.2 1000010000100001

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!