Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HASKELL LANGUAGE 9 pts) Explain list comprehension based on your reading of http:/leamyouahaskell.com/starting- 21 pts) Explain what each of the following lines of code is

image text in transcribed

HASKELL LANGUAGE

9 pts) Explain list comprehension based on your reading of http:/leamyouahaskell.com/starting- 21 pts) Explain what each of the following lines of code is doing. Record the result. [x+ "ay"| x-[chicken", "soup", "pillow, "music"]] [if even x then "Hello" else "Goodbye" l x -[0.201] Coding Create each fmction in the table. You may use built in fiunctions that you find in Leam You a Haskell. Each function is worth 10 points. Number Desc Takes a list of integers and returns a list of integers where all values have had one added to them. Takes a float and returm a char representing the letter grade based on a standard scale (A if score>90, etc.) Takes a list of floats and returns a list of chars that represent the letter grades based off the original scores Takes a list of floats representing ounces, returns a list of floats where the ounce values have been converted to cup values (1 ounce = 0.125 ame addOne rawGradeToLetter convertRawsToLetters ouncesToCups Takes a list of floats representing ounces of water consumed, returns a list of floats represent the number of glasses of water consumed glassOfWater = 8 ounces) hydrated Takes a float representing the number of ounces of water consumed, converts it glasses of water, if glasses of water is greater than 8 return the string "Hydrated" else return Not Takes a float representing the number of ounces of water consumed, converts it to glasses of water, returns the number of glasses that need to be consumed (as a float) to be considered hydrated (8 ted" waterNeeded sses

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago