8000 GitHub - dht/wordle · GitHub
[go: up one dir, main page]

Skip to content
dhtPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Write a program that accepts two “5 letters long” words and do the following:
Iterate over user input, and output a 5 letters word, using the following: "!" if the input letter is at the same spot as the letter in the secret word "?" if the input letter is present in the secret word but not in the right position "*" otherwise (wrong letter)
wordle("horse", "human")
!****
wordle("horse", "hotel")
!!*?*
wordle("horse", "house")
!!*!!
wordle("horse", "horse")
!!!!!

Now let’s add another complication - I want each letter in secret, to be “used” up to one time, i.e - not give “double hints”. We prioritize! over ?, otherwise - use the order in the “guess” word. That is:
wordle("drake", "awake")
**!!!
wordle("abbbb", "caaaa"
*?***
wordle("ababc", "babad")
????*

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0