What are the differences betweenCONS, LIST, and APPEND?

Answers

Answer 1
Answer:

Answer:

These all are constructors.

CONS

(CONS A B)

makes a pair like this:   (A . B)  

In other words, A is the CAR of the pair; B is the CDR of the pair.

For  example:

(CONS 4 5) ==> (4 . 5)

(CONS 4 '(5 6)) ==> (4 5 6)

[The pair (4 . (5 6)) is the same thing as (4 5 6)].

APPEND  

(APPEND A B)

makes a new list by replacing the final nil in A with the list B. A and  

B must be proper lists.

For example:

(APPEND '(4) '(5 6)) ==> (4 5 6)

This takes any amount of number and put in this order

LIST  

In this ,it will return a list whose elements are value of arguments in the order as it appeared in the LIST.It can take any amount of parameters

For example,

(LIST 4) ==> (4)

(LIST 4 5) ==> (4 5)

(LIST 4 5 '(6 7)) ==> (4 5 (6 7))

(LIST (+ 5 6)(* 5 6)) ==> (8 9)


Related Questions

Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB, 300 MB, and 185 MB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 200 MB, 15 MB, 185 MB, 75 MB, 175 MB, and 80 MB (in order)? Indicate which—if any—requests cannot be satisfied. Comment on how efficiently each of the algorithms manages memory.
Write a program that reads a list of words. Then, the program outputs those words and their frequencies. If the input is 5 hey hi Mark hi mark (the first number indicates the number of words that follow), the output is:hey 1hi 2Mark 1hi 2mark 1Hint: Use two vectors, one for the strings, another for the frequencies.Your program must define and use the following function: int GetFrequencyOfWord(vector wordsList, string currWord)
Discuss thefactors that are vital to achieve clarity in themessage?
A mobile device user is having problems launching apps and texting. The user touches an app to launch it, but the app icon next to the desired app launches instead. When the user types a text message, every word in the message is misspelled. What is the most likely cause for this behavior?
Gus is developing new software in an environment in which incremental changes are released at regular intervals within a timebox. Shana is developing software for the minimum viable product stage in order to provide the development team with feedback on how to improve the application. Gus is employing the software methodology known as __________, while Shana is employing the software methodology known as __________.

Express the worst case run time of these pseudo-code functions as summations. You do not need to simplify the summations. a) function(A[1...n] a linked-list of n integers) for int i from 1 to n find and remove the minimum integer in A endfor endfunction

Answers

Answer:

The answer is "O(n2)"

Explanation:

The worst case is the method that requires so many steps if possible with compiled code sized n. It means the case is also the feature, that achieves an average amount of steps in n component entry information.

  • In the given code, The total of n integers lists is O(n), which is used in finding complexity.
  • Therefore, O(n)+O(n-1)+ .... +O(1)=O(n2) will also be a general complexity throughout the search and deletion of n minimum elements from the list.

Preserving confidentiality, integrity, and availability is a restatement of the concern over interruption, interception, modification, and fabrication. i. Briefly explain the 4 attacks: interruption, interception, modification, and fabrication.
ii. How do the first three security concepts relate to these four attacks

Answers

Answer and Explanation:

I and II answered

Interruption: interruption occurs when network is tampered with or communication between systems in a network is obstructed for illegitimate purposes.

Interception: interception occurs when data sent between systems is intercepted such that the message sent to another system is seen by an unauthorized user before it reaches destination. Interception violates confidentiality of a message.

Modification: modification occurs when data sent from a system to another system on the network is altered by an authorized user before it reaches it's destination. Modification attacks violate integrity, confidentiality and authenticity of a message.

Fabrication: fabrication occurs when an unauthorized user poses as a valid user and sends a fake message to a system in the network. Fabrication violates confidentiality, integrity and authenticity.

why is the disk method a special case of the general slicing​ method? choose the correct answer below. a. the cross sections of the slices are disks with holes through them. b. the functions that generate the solids are all lines. c. the functions that generate the solids are all parabolas. d. the cross sections of the slices are disks.

Answers

Answer: d)The cross sections of the slices are disks.

Explanation:The slicing method deals with the elimination of the horizontal layer of the solid body .It is considered that disk method is the special case of the slicing method.

Disk method consist of the slices that are used for the estimated volume of the solid body of revolution that are known as disk.The solid body revolving around a line and its volume is estimated.Thus, the correct option is option (d).

Given a String variable named sentence that has been initialized, write an expression whose value is the number of characters in the String referred to by sentence.

Answers

A String variable named sentence that has been initialized, write an expression whose value is the number of characters in the String referred to by sentence. Python: sentence = “this is the sentence.” size = lens (sentence), C++: string sentence = “this is the sentence.” int size = sentence.

What is python ?

Python is an programming language with the integration of dynamic semantics for web and app development, extremely attractive in the field of Rapid Application Development.

Python is simple in comparison to other language program,  so it’s easy to learn and understand well; it needs a unique syntax which is mainly focus on readability.

Developers can read and translate Python code in a easy way, than other languages and reduces the cost of program maintenance and development.

For more details regarding python, here

brainly.com/question/18502436

#SPJ2

Python:

sentence = “this is the sentence.”
size = len(sentence)

C++:

string sentence = “this is the sentence.”
int size = sentence.size()

* Remember strings are just arrays of characters.

Technician A says a 2:1 gear ratio doubles the amount of torque. Technician B says a 2:1 gear ratio reduces the speed by half. Which technician is correct? A. Technician A only
B. Neither Technician A nor Technician B
C. Both Technician A and Technician B
D. Technician B only

Answers

b, a 2 to 1 increases doubles speed and reduces speed by half

What component can be used for user input or display of output?JButton
JLabel
JTextField
JFrame

Answers

Answer:

JTextField

Explanation:

JTextField is a Swing control which can be used for user input or display of output. It corresponds to a textfield and can be included with other controls such as JLabel, JButton,JList etc. on a comprehensive user interface which is application dependent. JTextField supports a read-write mode where the user can enter a value and it also supports a read-only mode which can be used to display non-editable output to the user.

Other Questions