Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!