Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Lo Shu Magic Square is a grid with 3 rows and 3 columns, shown in figures below. The Lo Shu Magic Square has the

The Lo Shu Magic Square is a grid with 3 rows and 3 columns, shown in figures below. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 through 9 exactly. The sum of each row, each column, and each diagonal all add up to the same number. This is shown in Figure B. In a program you can stimulate a magic square using a two-dimensional list. Write a function that accepts a two-dimensional list as an argument and determines whether the list is a Lo Shu Magic Square. Test the function in a program.

Requirements Must throw an exception. I should not be able to type in any a character or character key. It should prompt me to enter a number from 1-9. Input Validation: It should not let me enter in any number. It should ask you to enter a number from 1 - 9 Your code should allow you to play again. You will need a loop. You should add a feature like a counter to track wins and lost. Turtle another feature showing you result. Add a new option. Allow me to choose option 1 prompt the user or option 2 setting the list. This required. Use an if elif. Please make sure you include instructions in your program. Your detailed Algorithm should include all for, if statements in the process, all function explanations. The input should consist of all explanations of input. Output should consist all the outputs in your program. Every line should consist of a comment use key words like Get, Ask, Prompt the user, and Calculate or Compute, and Display.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

Write the code in R to compute misclassification error.

Answered: 1 week ago