Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WRITE IN HASKELL PROGRAMMING LANGUAGE ONLY PLEASE 1] Function #1 will allow the user to print an 8 x 8 checkerboard of two pictures of

WRITE IN HASKELL PROGRAMMING LANGUAGE ONLY PLEASE

1] Function #1 will allow the user to print an 8 x 8 checkerboard of two pictures of the same size.

  • Program_1 currently contains function twoByTwo:
    • This function allows the user to create a 2 x 2 picture of a checkerboard of two existing pictures. This picture can then be displayed by using printPicture.
    • For example, if the module contained a picture of a white square and a black square (printing twoByTwo for these would give:
  • Your task is to write a function that will print an 8 x 8 checkerboard of two pictures. To write this function, proceed in the following manner:
    • Using twoByTwo and Pictures above and sideBySide functions, write a function named fourByFour that creates a picture that is a 4 x 4 checkerboard of two pictures.
    • Then using fourByFour, write a function named eightByEight that creates an 8 x 8 checkerboard of two pictures.
    • Finally write function1 that prints an 8 x 8 checkerboard of two pictures.
      • For example, the user might type: function1 white black where black is a picture of the same size as Pictures white but is composed of all # characters (i.e., all black pixels instead of all white pixels).
      • Note: The user can specify any two pictures as long as they are of the same size so that sideBySide and above work correctly.
  • Note: The function does not need to check that the two pictures given by the user are of the same size; this is the duty of the user of the function.

2] Write a function that does not use guards that returns the maximum of 4 integers.

  • The numbers may not all be distinct.

3] Write a function using guards that returns the maximum of 4 integers.

  • The numbers may not all be distinct.

4] Write a function that does not use guards that returns the middle value of 3 integers.

  • The numbers may not all be distinct.

5] Write a function that does uses guards that returns the middle value of 3 integers.

  • The numbers may not all be distinct.

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

Students also viewed these Databases questions

Question

2. How will the team select a leader?

Answered: 1 week ago