Find Jobs
Hire Freelancers

lisp programming help please

$10-30 USD

Zaprt
Objavljeno pred več kot 2 letoma

$10-30 USD

Plačilo ob dostavi
The first function is a power function that will calculate x^i , where x can be either a real number or an integer, but i must be an integer. In the first version, you will write this recursively, using the classic technique that was probably used when you first saw recursion. In the second version, you will write a function that will use a loop to construct a list containing the proper number of multiplications and then have Lisp evaluate that. The second function will receive a list of integers and will return a result that is a two element list consisting of the smallest and largest values in the original list. The first version you will do will have two helper functions that find the largest and smallest values that are used to construct the result. In the second version, you must accomplish this task in one recursive function. Thoughts: The recursive power function is quite easy, but the second is a little harder. One way to accomplish this is to have a local variable that is used to hold the list as you build it, and then use a do loop that keeps adding the proper items to this list in the proper quantity. In other words, to calculate 53 you could build the list (* 5 5 5) and then evaluate it. Using helper functions to write the largest/smallest function will make that quite easy, but the nonhelper version of this problem can be quite involved. Thinking about the following might help: • Remember that one way to accomplish a recursive function is to keep making recursive calls until you get to the empty list and then do the real work on the way back “up.” • If there is one element in a list, it is both the largest and the smallest. • When the recursive function call returns, you now have a two element list with the smallest and largest values that are in the cdr of the list. You now only need to consider how the car of the current list might alter this result
ID projekta: 31205091

Več o projektu

3 ponudb
Projekt na daljavo
Aktivno pred 3 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
3 freelancerjev je oddalo ponudbo s povprečno vrednostjo $72 USD za to delo
Avatar uporabnika
Thanks for your project. I will create these 4 LISP projects (solving each problem twice). A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$88 USD v 4 dneh
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava UNITED STATES
Las Vegas, United States
0,0
0
Član(ica) od avg. 17, 2021

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.