Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
CSC108H Assignment 1: Wordlock
Due Date: Wednesday September 25, 2024 before 4:00 p.mWordlock: A Word Game
In this assignment you wll wite functions to implement a puzle game that requires the player to use a number of simple moves to unscrambled a given word. The goal of thegame is to discover the correct answer word.
Goals of this Assignment
Use the Function Design Recipe , to plan, implement, and test functions.. Write funchion bodies using varables, numeric types, strings,and conditional statements.You can do this whole asignment with only the concepts from the Weeks 1, 2. and3 Prepare Exercises for CSC108..Learn to use Python 3, Wing 101, provided starter code, a checker module, and other tools.
The Wordlock Game
Before you begin writing any code,you frst need to understand the Wordlock game. Gameplay is described in the paragraphs below, so read carefully!Game Mechanics
In the game, the player is presented with a scrambled version of the answer sting. The answer sting has been scrambled by frst spiting it into sechions,each having the samelength, and then rearranging each section randomly, as in Figure 1.
Figure 1: Strings are scrambled in sections.
ROCKLAKE
OCKREAKL
In Figure 1. the section"Rock' has been scrambled to become 'ocke’ and the section "LAke’ has been scrambled to become "rak The secionsin the sting are numbered 1 toN,whereNis the total numper ofsectons.The section ength is fxed for each run ofthe game and every sechop wilhave the sameength For example consider the string'treerocklake' and a section length of 4l There are 3 sectons in fotal and section 2 is 'rock
What NOT to do
Your completed wordiok functians.py fle should contain the starter code, plus the function defnitons specifed above.The functions you write must not include any cals tofunctions fprint or input . Also, do not include any extra code outside of the function defnitions, and do not import any modules.
CSC108 A1 Checker
We are providing a checker module ( a1 checker.py ) that tests two things.
whether your functions have the correct parameter and return types, and whether your code follows the Python and CSC108 style guidelines
To run the checker,open a1 checker.py and run it. Note: the checker fle should be in the same directory as your wordiotk fmnctions.py,as provided in the starter code zip fl. Youcan find a demo of the checker being run in the Week 3 prepare exercises on PcRs. When you run your own checker, be sure to scrol up to the top and read a mesages.
lf the checker passes:.Your code follows the style guidelines.. Your funchion parameters and return types match the asignment specifcaion. This des not mean that your code works corectly in allsituations. We wil run additionaltests on your code once you hand it in, so be sure to thoroughly test your code yourself before submitting it.lf the checker fails, carefully read the message provided:
. It may have failed because your code did not folow the stle guidelines. Review the eror descriptions) and fx the code stye. Please se the PyA documentation E for moreinformation about errors.lt may have failed because:
you are missing one or more functions,
o one or more of your functions is misnamed.
o one or more of your functions has the incorrect number or type of parameters, or
o one or more of your function return types does not match the assignment specifcation, or
your .py fle is misnamed or in the wrong place.
Read the error message to identify the problematic function, review the function specifcation in the handout, and fx your code.
Make sure the checker passes before submitting on MarkUs.
Running the checker program on MarkUs
In aditon to running the checker program on your own computer,run the checker on MarkUs as wel. irst,submit your work on MarkUs, Next, ick on the "AutomatedTesting" tab and then cick on"Run ests". Wait for a minute orso, then refresh the webpage, 0nce the tests have fnished rumning.you'l see resuits for the style Checker andIype Checker components of the checker program see both the Automated Testing tab and results fies under the Submisions tab.Note that these are not actualy mark. jusithe checker results, This is the same checker that we have provided to you in the starter code. If there are erors, edit your code,run the checker program again on your ownmachine to check that the problems are resolved, resubmit your assignment on MarkUs, and rerun the checker on MarkUs
Marking
These are the aspects of your work that may be marked for A1.
Marking
These are the aspects of your work that may be marked for A1:
Coding style (20%: Make sure that you folow python style guidelines that we have introduced and the python coding conventions that we have been using throughout thesemester. Although we don't provide an exhaustive list of stye rules, the checker tests for style are complete, so ifyour code passes the checker, then it wilearn ful marksfor coding style with one exception: docstrinss wil be evalated separately., For each ocurence of a PyTA erro, a 1 mark (out of20) deduction wil be apied. for exampleif a C0301 (line-too-long) error occurs 3 times, then 3 marks will be deducted.Corectness 180%: Your funchions should perform as specifed. Correctnes,as measured by our tests,willcount for the largest single portion of your mark. Once yourasignment is submited, we willrun aditional tests,not provided in the checker.Pasing the checker does not mean that your code wil eam ful marks for corectnes
No Remark Requests
No remark reouests wllhe accented Befre the deadime you are resposible for mping your code andthe checker poram toidenity and resowe any erors that wil prevenourtests from rwunnine, A syntax elor that prevents your code from unning could resut ina grade of0 on the asignment - make sure you make use of the checker program!.
Going Further (optional, not for marks)
This assignment is designed to be doable with only the conceptswe see in the frst few weeks ofthe course.This means that there are a lot of choices we made in designing thissystem that could be improved on as wein which you could improve the entire system (both the functions andprogram fles) with additional concepts.
lf you are fnding this assignment pretty straightforward, we encourageYou will notice that there is code provided in wordlockyouto feure out how the program code works.and to then think about how to improve it. Bythe end of this course. you wllbe abe o understand al of the code in the providecfunctions, and likely even be able to think of ways to improve it! You may also think of bettelwvs to renresent the data in the nrogrammportant: Your code will be evaluated on how it meets the function descriptions abo:about how to improve the program, do NOT submitthese improvements as part of your Assignment 1 submission.
What to Hand In
The very last thing you do before submiting should be to run the checker module on MarkUsone lat time., 0therwise,you could make a smal eror in your fnal changesbefore submitting that causes your code to receive zero for correctness.
Submit your mrdack fmrtion. fle to the Asignment 1 asessment on Markus, emember that spelng of flenames,incuding case, counts:your fle must be named exactiywordnlock functions.py. You can uplad your file as many times as you want, and your last submision before the deadline wilbe marked.Make sure you run the checker in MarkUsone last time and verify it passes so we will be able to test your code.
lgnore the text below about Points and Submitting.