this is the be anwsered in the language scheme and it only

Recursive function
;; makes two lists of every element
(define split
(lambda (L)
(if (null? L)
'()
(list (first L) (second L)))))
;; the first list
(define first
(lambda (L)
(cond ((null? L) '())
((null? (cdr L)) L)
(else (cons (car L)
(first (cdr (cdr L))))))))
;; the second list
(define second
(lambda (L)
(cond ((null? L) '())
((null? (cdr L)) '())
(else (cons (car (cdr L))
(second (cdr (cdr L))))))))
Q. What should split return if its input is an empty list? Explain why.
A: When input is an empty list it returns (). As in the code above we are checking whether given list is empty or not using condition. If the list is empty we are returning empty list ().
please write these as you would into python. . i will give an thumbs ups 1. Evaluate the following expressions using Python 1. Product of first 10 even integers. 2. Midterm scores of 4 students are 89, 78, 90, 98. Find the average of these scores. 3. Evaluate 3 to the power 7 4. Find the number of foot in 345 inches. 5. find the remainder when 34567 divides by 17. 2. animals = ['cat', 'dog', 'lion', 'tiger', 'monkey', 'hyena']...
1. The following function t(n) is defined recursively as: 1, n=1 t(n) = 43, n=2 -2t(n-1) + 15t(n-2), n> 3 1. Compute t(3) and t(4). [2 marks] 2. Find a general non-recursive formula for the recurrence. [5 marks] 3. Find the particular solution which satisfies the initial conditions t(1) = 1 and t(2) = 43. [5 marks] 2. Consider the following Venn diagram, illustrating the Universal Set &, and the sets A, and C. А B cat,pig mouse, horse camel...
%%%%Python Question%%% Work from the template acrostic.py, which you can find on the ELMS page for this assignment. • In the Generator class, write an __init__() method with two parameters: self and the path to a text file containing one word per line. This method should read the words from the file, strip off leading and trailing whitespace, and store them in a dictionary where each key is a lower-case letter and each corresponding value is a list of words...
mammals.txt squirrel,2,0.5,Herbivore,Sciurus griseus kangaroo,7,90,Herbivore,Macropus rufus gorilla,20,150,Herbivore,Gorilla beringei sea lion,12,250,Carnivore,Zalophus californianus guinea pig,4,3,Herbivore,Cavia porcellus whale (grey),70,36000,Herbivore,Eschrichtius robustus cat,12,4,Carnivore,Felis catus sheep,12,180,Herbivore,Ovis aries giraffe,10,1000,Herbivore,Giraffa mouse,3,0.04,Omnivore,Mus musculus puma,12,50,Carnivore,Puma concolor orca,50,4000,Carnivore,Orcinus orca beaver,5,20,Herbivore,Castor canadensis fox,7,6,Omnivore,Vulpes vulpes donkey,12,300,Herbivore,Equus asinus buffalo,15,650,Herbivore,Bison bison cow,15,700,Herbivore,Bos taurus baboon,20,40,Omnivore,Papio ursinus horse,20,500,Herbivore,Equus ferus caballus moose,12,450,Herbivore,Alces alces goat,9,90,Herbivore,Capra aegagrus hircus chimpanzee,20,45,Omnivore,Pan troglodytes bear (grizzly),25,270,Omnivore,Ursus arctos leopard,12,55,Carnivore,Panthera pardus camel,40,500,Herbivore,Camelus dromedarius rhinoceros,40,2000,Herbivore,Ceratotherium simum simum hippopotamus,25,1400,Herbivore,Hippopotamus amphibius opposum,1,4,Omnivore,Didelphis virginiana howler monkey,15,7,Herbivore,Alouatta palliata deer,8,55,Herbivore,Odocoileus virginianus elephant,65,4500,Herbivore,Elephas maximus dog,12,25,Carnivore,Canis lupus familiaris bat,15,1,Omnivore,Pteropus vampyrus wolf,5,40,Carnivore,Canis lupus zebra,15,300,Herbivore,Equus quagga elk,15,280,Herbivore,Cervus...
write an SQL statement to list all the people in the Owner table, along with their pets' names if any. That is, for each pet an owner has, there will be a record containing the owner and the pet's name. For any owner contained in the Owner table, the output should always contain the owner's record even if no pets are associated with this owner. Hint: outer join/s may be needed. -- DROP TABLE PetAndOwner, Pet, PetType, Owner; CREATE TABLE...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
Spanish Vocabulary Helper For this assignment, we are going to work with adding and removing data from arrays, linear search, and File I/O. In addition, you will learn to work with parallel arrays This program will assist an English-speaking user to build their vocabulary in Spanish This program will read a file containing a list of words in English and another containing the translation of those words in Spanish. The words and corresponding translations should to be stored in two...
Write a method called printReverse() that
takes a string and uses recursion to print the contents of the
string in reverse order. The string itself should
not be reversed; it must be left in its
original form.
The method has the following header:
void printReverse(String s, int i)
where s is a reference to the string, and i is an integer
parameter that you may use as you see fit. You do not need
to code up this method as...
I NEED HELP WITH THIS HOMEWORK!!!! What is a characteristic of a bag data type? Elements are added and removed in any order Elements are removed in the same order they were added Distinct elements are added in any order but are removed beginning with the last one added Distinct elements are removed in the reverse order they were added Which scenario illustrates a data stack structure Standing in a line to be serviced Filing documents in alphabetical order Offering...