Python Coding Project Help



Python Coding Project: RESOURCES ALLOWED: This project is to be completed individually. The only resources you may use when completing the project are ˆ Material posted on the course Blackboard pageˆ The course textbook and “further resources” listed in the Syllabus If you are unsure about whether a resource is allowed, then please ask your instructor. You should also consult the course syllabus for a further explanation of academic honesty. This Python Coding project will create a GUI using Tkinter to help a user solve a daily Wordle. WHAT TO SUBMIT: You will submit one Python file project3-<lastname>-<firstname>.py where <lastname> and <firstname> are replaced with your last and first name, respectively.
The first lines of each of your files should include the following:
#<firstname> <lastname>
#MCS 260 Spring 2022 Project 3
#I hereby attest that I have adhered to the rules for projects as well as UIC’s
Academic Integrity standards while completing this project.
The rest of your file should perform the actions described below.
ACTIONS: 1. First you should become familiar with the game Wordle. It is not necessary to be good at the game, but you should be aware of it and how it is played.
2. Download the file in Blackboard called AllWords.txt that is a copy and paste of all the words available on Wordle. You should download this file and, using whatever method you would like, create a file AllWordsLines.txt that has each word on its own line with no quotes. There should be 2309 lines of words when you finish.
3. Write a function ExactLetters that takes as input a string S that is exactly five characters
long containing only alphabetic characters and the underscore character. For instance, the
string could be S = “_arts” or S = “R_t_D”. The function should search AllWordsLines.txt
and return a list of all words that match the given string S exactly, where an underscore is
considered a wildcard character (i.e. any character could fill the space).

Python Coding Project Help


For example, if we were to run ExactLetters(“__art”), then SOME of the words returned
in the list would be heart, quart, and smart, however the word earth would not be returned
since the wildcard characters must be the first and second characters, a must be the third
character, r must be the fourth letter, and t must be the last letter.
4. Write a function ContainsLetters that takes as input a string T that has at most five charac-
ters containing ONLY alphabetic characters. It should search AllWordsLines.txt and return
a list of all words that have all the characters in T.
For example, if we were to run ContainsLetters(“abc”), then SOME of the words returned
in the list would be bacon, aback, and cobra, however the word labor would not be returned
since it does not have the character c in it.
5. Write a function InBoth which takes as input two lists L1 and L2 and returns a list of all
elements that are in BOTH lists, with no duplicates. The order of the elements does not
matter.
6. Using Tkinter, you need to create a GUI similar to the picture below. The top line should
be some text (currently Text1) explaining what the five boxes below it are for. Then below
that top line should be five input (Entry) boxes. These five boxes will be used with the
ExactLetters function described above. A user will be allowed to put one character in each
box. Note: If the user presses the submit button and a box has more than one character in
it, then an error should be printed. A user is allowed to leave a box empty; this will then be
recorded as the underscore character in ExactLetters.
7. Below the top five entry boxes should be further text (currently Text2) and another set of
five Entry boxes. These five boxes will be used for the ContainsLetters function described
above. You should replace Text2 with an explanation of what these five boxes are for. Again
a user can only put one character in each box and upon submit, if a box has more than one
character, an error should be printed. A user is allowed to leave a box empty.
8. There should be a submit button (currently it says Find Me Some Words!). Upon pressing
this button the program should
(a) Check if all ten boxes have at most one alphabetic character in them. If not, it should
display an error box about which box(es) are causing an error.
(b) If all ten boxes have at most one alphabetic character in them, then use the functions you
wrote above which should filter the list of words in AllWordsLines.txt and print an info
box with all the words that fit the user’s conditions.
9. To check that your python coding program is working properly, here are a few examples.
(a) ExactLetters(“s ar “) should return the list [’start’, ’smart’, ’shard’, ’scare’,
’snarl’, ’snare’, ’stare’, ’share’, ’swarm’, ’sharp’, ’shark’, ’scarf’, ’spare’,
’spark’, ’scary’, ’stark’]
(b) ContainsLetters(“abc”) should return the list [’basic’, ’aback’, ’black’, ’scuba’,
’cabin’, ’beach’, ’cobra’, ’bacon’, ’cable’, ’cabal’, ’brace’, ’cabby’, ’batch’]
(c) If L1 = ExactLetters(“b d”) and L2 = ContainsLetters(“abde”), then InBoth(L1,
L2) should return the list [’bread’, ’beard’]. Note that in this example, len(L1) =
17 and len(L2) = 10.
(d) Further examples will be shared in a separate document Examples.txt.
10. ADD COMMENTS to clarify your choice of variables and to indicate what is happening at
different steps of the program. A good rule of thumb is one line of comments for every four
to five lines of code. Your comments will be checked to see that you understand how your
code is structured and what it is doing in the big picture. Code lacking in comments will be
penalize

For Python Coding Project Help please click here

Leave a comment