Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with HASKELL CODE please!!! I have the modules set up but I dont know how to do exercise set A numbers 1 and 2.

Help with HASKELL CODE please!!!
I have the modules set up but I dont know how to do exercise set A numbers 1 and 2. I put the descriptions of the function in comments image text in transcribed
module ExanDsi-1na a ExanDs1.hs (correctchoice, lenquestion, validQuestion, hasTag, eqBag, selectByTags, valdExam, makekey, question2html, exam2html) where - use the type QText to describe the text of a question type QText String use Tag to describe the topic tags we can associate with a question type Tag String can state a possible answer to the quesiotn using the data type Choice, -which has a single constructor answer data Question -Ask [Tag] QText [Choice] deriving Show it has two components, the text of the answer and a Boolean value that indicates - whether this is a correct answer to the question (True or not) type ATextString data ChoiceAnswer AText Bool deriving (Eq, Show) -As above, we use the type AText to describe the text of an answer -EXERCISE SET A---retee. - 1. Develop function correctchoice that takes a choice and determines whether it is marked -as a correct answer or not --correctChoice : Choice -> Boo.l -- correctChoice x 8 - 2. Develop function lenQuest lon that takes a question and returns the number of possible answers 1e 41 42 43 are given. - 1enquestion :: Question -> Int LenQuestion num

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

What are the best practices for managing a large software project?

Answered: 1 week ago

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago