Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs1-25sp
lecture-code
Commits
1ca63891
Commit
1ca63891
authored
2 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
minor tweak
parent
e8e765a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
07/wordle.py
+5
-1
07/wordle.py
with
5 additions
and
1 deletion
+5
-1
07/wordle.py
View file @
1ca63891
...
...
@@ -29,12 +29,14 @@ def how_many_exact_matches(word1: str, word2: str) -> int:
"""
...
def
get_counts_of_letter
(
word
:
str
,
letter
:
str
)
->
int
:
"""
Returns the number of occurrences of letter in word.
"""
...
def
get_counts_of_letters
(
word
:
str
)
->
dict
[
str
,
int
]:
"""
Returns a dictionary that maps all the distinct letters in word to
...
...
@@ -45,6 +47,7 @@ def get_counts_of_letters(word: str) -> dict[str, int]:
"""
...
def
how_many_overall_matches
(
guess
:
str
,
answer
:
str
)
->
int
:
...
...
...
@@ -66,9 +69,10 @@ def play_wordle_game():
# print("Nice job! That's correct!")
# print("You got " + str(exact) + " letter(s) exactly correct!")
# print("You got " + str(misplaced) + " letter(s) misplaced!")
pass
again
=
True
again
:
bool
=
True
while
again
:
play_wordle_game
()
again
=
prompt_yes_no
(
'Would you like to play again (y/n)? '
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment