Question: 1 Problems to Solve Use a functional programming language of your choice to solve the following problems. Keep the programs as simple as possible. For
1 Problems to Solve Use a functional programming language of your choice to solve the following problems. Keep the programs as simple as possible. For example, you need not be concerned about checking for input errors or creating well formatted outputs. Refer to Chapter 15 of your textbook for an introduction to functional programming languages and some example program segments. 1.1 Summation Input two integer values and compute the sum of the numbers in the inclusive range of first value to the last value. For example, if the first value is 2 and the second value is 5, then the result will be 14 (which is 2+3+4+5). 1.2 Palindrome Input a string of characters and determine if it is a palindrome. That is, if it reads the same forward and backward. For example, the strings madam, taco cat or racecar are palindromes. 1.3 Quadratic Equation Find the real roots of a quadratic equation. That is, input the coefficients a, b, and c, and compute the two real roots x1, and x2. Refer to https://en.wikipedia.org/wiki/Quadratic_equation for the description of quadratic equation. 1.4 Merge Names Create a list of first names and a list of last names by inputting each name one at a time. Merge the two lists into one list consisting of (firstName lastName) pairs. Display the three lists. For example, if the inputs are John, Kim, Kate, George, Davidson, Hunter, Johnson, and Olson; then the resulting lists will be (John Kim Kate George), (Davidson Hunter Johnson Olson) and ( (John Davidson) (Kim Hunter) (Kate Johnson) (George Olson) ) 2 Output Display your name and class information on the first line of each output. X Assignment-Functional Programming Problems-Description Version: Refer to the version in the file name Last printed 11/20/2017 11:01 PM Page 2 of 2 Filename: Assignment-Functional Programming Problems-Description-Ver01.00.doc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
