subject

Write a function DOT-PRODUCT that takes two lists, each list has three numbers (elements), and produces the dot product of the vectors that they represent. For example,

-> (DOT-PRODUCT '(1.2 2.0 -0.2) '(0.0 2.3 5.0))

-> 3.6

Write a function COUNT-NUMBER that counts the number of numbers that occur in a list. It should work like this:

-> (COUNT-NUMBER '(A 2.3 B 5 4.53 C F))

-> 3

Write a function NEW-LIST that takes a number as its argument and constructs a list of that length containing all Ts. For example,

-> (new-lit 5)

-> (T T T T T)

The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument that counts the number of atoms that occur in a list at all levels. Thus, the following lists will have the following ALL-LENGTHs.

(A B C) => 3

((A (B C) D (E F)) => 6

(NIL NIL (NIL NIL) NIL ) => 5

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
Answers: 2
question
Computers and Technology, 26.06.2019 00:40
What will happen if we access all the limitations of computers into it? just like intelligence, self learning, feeling and other.
Answers: 1
You know the right answer?
Write a function DOT-PRODUCT that takes two lists, each list has three numbers (elements), and produ...
Questions
question
Mathematics, 04.09.2020 01:01
question
Mathematics, 04.09.2020 01:01
Questions on the website: 13722363