Reference no: EM131296983
Question#1:
a) Using built in predict function NUMBERP, develop a new predict function so-called "elemnts_are_numbers" that checks all the elements of a list are numbers.
See these examples:
> (elemnts_are_numbers '( 1 8 9 6) )
T
> (elemnts_are_numbers ‘( a 8 9 b ) )
NIL
b) Test your function on your computer by some (at least 3 examples) of different values for its input list and show results of your examples for this function.
Question#2:
In this exercise assume: "first= car" and "rest = cdr" and L is a given list containing only numbers
a) Analyze this code and explain what myfunction5 is doing? (defun myfunction4 (n L)
(cond
((null L) nil)
((zerop n) (first L))
(t (myfunction4 (- n 1) (rest L)))))
b) Test this function on your computer by some (at least 3 examples) examples of different values for its parameters (n L) and show your results of your examples for this function.
Question#3:
a) Assume L is list of only integer numbers (Including zeros, or positive, or negative numbers, or could be an empty list), write a function that finds and returns the leftmost even number from this (if any, otherwise return NIL).
Example: for L= (-7, 17, 8, 9, -16, 19, 0, 27, 28, 13) , you should return: 28
b) Test your function on your computer by some (at least 3) examples of different values for its input parameter (L) and show your code and results of your examples for this function.
Question#4:
a) Compare these two functions (sum-list 1 and sum-list2), what these function do?
b) which one is more efficient or more readable? and why?
(defun sum-listl (L)
(if (null L) 0
(+ (first L)
(sum-list (rest L)))))
(defun sum-list2 (L)
(apply #'+ L))
Analyze potential barriers to feasibility of implementing
: What are the unique or parallels between the implementation of this solution and the literature? Analyze potential barriers to the feasibility of implementing the proposed solution.
|
What did having a key informant add to your understanding
: What understanding was gained from participation compared to just observing?What did having a key informant add to your understanding?What was learned from participant observation at this event that a questionnaire or interview about it might miss?
|
What is an advantage for sue of starting her own health club
: How will CHC be taxed, given that Sue plans to be the sole owner?- What is an advantage for Sue of starting her own health club instead of operating a franchise health club?
|
Union and nonunion entities
: Aware of the union and nonunion entities within Elora Jean & Co., you have observed that the production supervisors are unclear on the facility's union grievance procedures, and the nonproduction supervisors are unclear on how to handle employee c..
|
Develop a new predict function
: Develop a new predict function so-called "elemnts_are_numbers" that checks all the elements of a list are numbers - Compare these two functions (sum-list 1 and sum-list2), what these function do?
|
Analyze any two types of qualitative research methods
: Analyze and describe any two types of qualitative research methods. Explain the advantages and disadvantages of qualitative as well as quantitative research.
|
Small business that develops gaming software
: A few years ago, a friend of yours started a small business that develops gaming software. The company is doing well, and is valued at $1.5 million based on multiples for comparable public companies, after adjustments for their lack of marketabili..
|
Is your firm involved in franchising
: A health club differs from manufacturing firms in that it produces a service rather than products.- Why might Sue need other partners if she had established a manufacturing firm instead of a health club?
|
Approached by friend who is starting minor league baseball
: You have been approached by a friend who is starting a minor league baseball team in your city. He is seeking ten investors to put up $50,000 each. Expected net cash inflows over each of the next ten years are $350,000.
|