Find Jobs
Hire Freelancers

Write a Program in the Scheme Programming Language

$10-30 USD

Lezárt
Kiadva ekkor: több mint 6 évvel ezelőtt

$10-30 USD

Teljesítéskor fizetve
Write a Scheme program that implements the following functions: • (convert number base) The function should convert the number in base 10 to its equivalent in base base • This procedure, called roll-till-you-win, takes as argument a particular bet and simulates the rolling of a die until the bet wins (define (roll-till-you-win bet) (let ((die-roll (1+ (random 6)))) (display die-roll) (newline) (cond ((=die-roll bet) (display “You won!”)) (else (roll-till-you-win bet))))) Modify roll-till-you-win so that the procedure makes a random bet at each roll. The new procedure should take no arguments and simply keep rolling the die until the random bet happens to be the same as the new roll. Here is a sample printout of the result: Bet: 5 Result: 4 Bet: 1 Result: 3 Bet: 4 Result: 4 You won! • Write a third procedure: (list-primes n) This procedure will print the prime numbers up to n. Sample: (list-primes 20) 2 3 5 7 11 13 17 19
Projektazonosító: 15728612

A projektről

2 ajánlat
Távolról teljesíthető projekt
Aktiválva: 6 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
2 szabadúszó adott átlagosan $50 USD összegű árajánlatot erre a munkára
Felhasználó avatár
Hello Sir, I've already started working on your project to deliver in time. I am a computer science tutor, I teach (among others) Scheme, LISP, Haskell, Prolog and Algorithms. I have done many projects like this, and I'm one of the top Scheme developers, and you can check by clicking on my profile picture. Please contact me for more details when possible. I look forward to work for you, Sir. Best Regards.
$55 USD 0 napon belül
4,7 (22 értékelés)
5,1
5,1
Felhasználó avatár
Hi, I have worked a lot with scheme and functional languages. I can do this to you in a couple hours. Thank you Habilidades e Experiência Relevantes I have implemented a lot of algorithms in Lisp/Scheme. Pré-pagamentos Propostos $20 USD - First function $20 USD - Second function $20 USD - Third function
$45 USD 0 napon belül
5,0 (3 értékelés)
3,0
3,0

Az ügyfélről

UNITED STATES zászlója
Seattle, United States
4,8
1
Tagság kezdete: nov. 25, 2017

Ügyfél-hitelesítés

További munkák ettől az ügyféltől

Write a Prolog Program
$10-30 USD
Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.