Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 4 ( 2 0 points ) : Purpose: To build a program and test it , without starting with a design document. To get
Question points:
Purpose: To build a program and test it without starting with a design document. To get warmed up with
Python, in case you are using it for the first time.
Degree of Difficulty: Moderate. Dont leave this to the last minute. This task involves an unfamiliar prob
lem, but the program itself is not more difficult than anything youve done in CMPT
References: You may wish to review the following chapters:
Lists: CMPT Readings: Chapter
File IO Review: CMPT Readings: Chapter
Restrictions: This question is homework assigned to students and will be graded. This question shall not
be distributed to any person except by the instructors of CMPT Solutions will be made available
to students registered in CMPT after the due date. There is no educational or pedagogical reason
for tutors or experts outside the CMPT instructional team to provide solutions to this question
to a student registered in the course. Students who solicit such solutions are committing an act of
Academic Misconduct, according to the University of Saskatchewan Policy on Academic Misconduct.
Note: aq asks about your work on aq
Keep track of how long you spend working on this question, including time spent reading the ques
tion, reviewing notes and the course readings, implementing the solution, testing, and preparing to
submit. Also keep track of how many times you experienced unscheduled interruptions, delays, or
distractions during your work; include things like social media, phone calls, texting, but not such
things as breaking for a meal, exercise, commuting to or from the university. In aq you will be
asked to summarize the time you spend working on aq and your answer will be more helpful to
you if you have more precise records. Maybe go and read Q before you start Q
The Torus Square
The following description considers the manipulation of a times array of integers, which can be considered
a kind of simple game. The description will start by describing the rules of the game, and then youll be
told what your task will be It is highly unlikely that you will discover anything sensible on the internet about
this game. It was invented by one of your instructors.
Consider an times array of integers such as:
This is a kind of a puzzle, where we allow rows to be shifted left or right, and columns to be shifted up or
down. We will call these actions unit rotations, for reasons that will be clarified immediately.
A unit rotation is simply a shift of all the elements of a row or column by one position. For example, we
can rotate the top row of the previous example one position to the right to get the following:
Notice that the integer that was on the end of the row moved to the front after the rotation to the right.
Because the number moved to the front of the row, we call it a rotation. Similarly, we can rotate the
bottom row one position to the left to get the following:
Page
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started