Question: Write a script which will prompt the user for a number, N. Your script will then call a function square that creates and returns an

 Write a script which will prompt the user for a number,

Write a script which will prompt the user for a number, N. Your script will then call a function square that creates and returns an N times N square matrix, called F, where the 'edge values' are all 1 and the internal values are 0. You may assume that N > = 3. For example: If user enters 3, the function square(3) will return F = 1 1 1 1 0 1 1 1 1 If user enters 6, the function square(3) will return F = 1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1

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!