Difference between revisions of "CSC111 Final Exam 2015"

From dftwiki3
Jump to: navigation, search
Line 3: Line 3:
 
=Problem 1=
 
=Problem 1=
 
<br />
 
<br />
We have seen in class how to write code that creates an 8x8 checkerboard, and positions checkers on the boardWe have seen how we can move the checkers from one cell to another, but the program we wrote allows any kind of moves the user indicates, whether they are legal or not.
+
This problem is based on [[CSC111_Homework_11_2015| Homework 11]]In Problem 1 of Homework 11, the user is asked to enter the name of a file, and then the program outputs statistics about the data stored in the fileIn this exam problem, the user may enter the name of '''several files''', one after the other. There is no limit on the number of files the user enters.   The exam program then outputs the same answers as for Homework 11 Problem 1, but prefixes each answer with the name of the city for which the data applies. 
 
+
<br />
Your assignment is to write a program that, given the current position of a piece and its color, and the position picked by the user, will determine if the move is valid or notYour program will '''not use''' the graphics library.   We are simply interested in figuring out how to determine if a move is legal or not.
+
==Requirements==
 
+
<br />
Your program will read a text file containing the description of the move proposed by the user, and a description of the location of all the checkers pieces are on the board.  Your program will then output just one line of text containing the either "legal" or "not legal".
+
* Store your program in a file called '''final1.py'''.
 +
* The name of the files are all entered on one line.
 +
<br />
 +
==Example==
 +
<br />
 +
...
 
<br />
 
<br />
 
=Problem 2: Frogger=
 
=Problem 2: Frogger=

Revision as of 09:07, 23 April 2015


...