Waived!

Wordle is a popular online word game Wordle There are instructions given at the official site for

(2 customer reviews)

$10.00

Download button will appear immediately after successful payment.

Full support will be provided with necessary files installation.

Get impeccable customized solution within 24 hours, hassle-free.

View Details
SKU: 4762 Category: Tags: , , , , , , , , , , , , , , , ,
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Instant
Download

Description

Wordle is a popular online word game called Wordle. There are instructions given at the official site for Wordle, but essentially, it is a word guessing game. In this game, each guess is marked by indicating which letters of your guess match a secret answer.

A Green mark indicates that you have found a correct letter in the correct position in the secret word. A Yellow mark indicates that you have found a correct letter but in an incorrect position relative to the secret word. A Grey mark indicates that the given letter does not appear in the secret word at all.

Be careful of duplicate letters: a letter that is guessed twice may be marked once as Green or Yellow and once as Grey if there is only a single occurrence of that letter in the secret word. In particular, Green markings take priority over Yellow markings, and Yellow markings have a priority in the guess, reading from Left to Right.

Given the datatypes dataCheck = GreenYellowGrey deriving (Eq, Show, Read), typeMarking = [(Char, Check)], write a function markGuess :: String -> String -> Marking that takes the secret word to be guessed and a guess of the same length. The function should return a marking according to the Wordle rules. The order of the returned marking matters and should satisfy map fst (markGuess secret guess) == guess.

An example marking showing the marking priorities is markGuess “aaabb” “bbxxb” should return [(b, Yellow), (b, Grey), (x, Grey), (x, Grey), (b, Green)]. The final ‘b’ in the guess is marked Green because it is correctly placed in the secret word. The first ‘b’ in the guess is marked Yellow because there is a second occurrence of ‘b’ in the secret word in a different position. The second ‘b’ in the guess is marked Grey because there is no third occurrence of ‘b’ in the secret word.

Note that your solution should work with strings of any length but should report an error where the two given strings are of different lengths.

Hint: A reasonable strategy is to write a helper function that finds the characters marked Green first. Then feed the result of that helper function into another helper function that finds the Yellow markings.


2 reviews for Wordle is a popular online word game Wordle There are instructions given at the official site for

  1. Bob Salerno

    Tutor is patient, highly efficient and well spoken. I can always count on early delivery! Thx!!

  2. Patrick Lorenz

    It was amazing work and in a very short time.

Only logged in customers who have purchased this product may leave a review.


You may also like…

Patron Details

Additional information

Your Solution

Product
Quantity
Total
Cart Subtotal $0.00
Order Total $0.00

  • Pay with your credit card.