Question: One easy python question, can anyone help me to solve it and show me a code screenshot? Question 1 (10 points) Purpose: To build a
One easy python question, can anyone help me to solve it and show me a code screenshot?

Question 1 (10 points) Purpose: To build a program and test it To get warmed up with Python, in case you are using it for the first Degree of Difficulty: Moderate. Don't leave this to the last minute. The basic functionality is easy. There A Magic Square is an arrangement of numbers in a square, so that every row, column, and diagonal add me are aspects of the problem that you won't appreciate until you start testing up to the same value. Below are two squares, but only one of them is a Magic Square 3 5 7 4 92 196 537 4 82 The square on the left is a 3 3 magic square, whose rows, columns, and diagonals all sum to 15. On the right, is a 3 x 3 square of numbers whose rows columns and diagonals don't have the same sum. There are magic squares of all sizes (except 2 x 2), but we'll be concerned with 3 x 3 squares, and checking if a given arrangement of 9 numbers is a magic square or noft Definition: A3 x 3 magic square is formally defined by the following three criteria: . It contains the integers 1 through 9 inclusively Every integer in the range 1 through 9 appears exactly once Every row, column, and diagonal sums to 15. In this question you will implement a program that does the following: . It asks the user for a sequence of 9 numbers from the console. The order of the numbers is important. as the rows of the grid use this order. For simplicity, assume that the user will type integers on the console. For this question, you don't have worry about what to do if the user types anything other than integers. It checks whether the sequence of integers is a magic square or not. Your program should display the message yes" if it's magic, or 'no if it's not . It's very important to point out that you are not being asked to construct a magic square; only to check if a square is magic or not. What to Hand In . Your implementation of the program: ald . py . A text document called a1qi_demo.txt, showing at least six (6) demonstrations of your program work- ing on 3 examples that are true magic squares, and 3 examples that are not magic squares. This is a demonstration, not testing. . If you wrote a test script, hand that in too, calling it a1q1_testing.py Be sure to include your name, NSID, student number, course number and laboratory section at the top of all documents. Question 2 (10 points): Purpose: To reflect on the work of programming for Question 1 To practice objectively assessing the quality of the software you write. To practice visualizing improvements, without implementing im- Degree of Difficulty: Easy Answer the following questions about your experience implementing the program in Question 1 You may use point form, and informal language. Just comment on your perceptions; you do not have to give really deep answers. Be brief. These are not deep questions: a couple of sentences or so ought to do it. 1 (2 marks) Comment on your program's correctness. How confident are you that your program (or the functions that you completed) is correct? What new information (in addition to your current level of testing) would raise your confidence? How likely is it that your program might be incorrect in a way you do not currently recognize 2. (2 marks) Comment on your program's efficiency. How confident are you that your program is reason ably efficient? What facts or concepts did you use to estimate or quantify your program's efficiency? 3. (2 marks) Comment on your program's adaptability. For example, what if Assignment 2 asked you to write a program to check whether a 5 x 5 square was magic (bigger square with a larger sum, using the numbers 1 through 25)? How hard would it be to take your work in A101 and revise it to handle squares of any size? 4. (2 marks) Comment on your program's robustness. Can you identify places where your program might behave badly. even though you've done your best to make it correct? You do not have to fix anything you mention here; it's just good to be aware. 5. (2 marks) How much time did you spend writing your program? Did it take longer or shorter than you expected? If anything surprised you about this task, explain why it surprised you. You are not being asked to defend your program as being good in all these considerations. For example if your program is not very robust, you can say that you don't need to make it robust What to Hand In Your answers to the above questions in a text file called a1 reflections.txt (PDF, rtf, docx or doc are acceptable) Be sure to include your name, NSID, student number, course number and laboratory section at the top of all documents
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
