Search found 4 matches

by jeltedeproft
Mon Oct 28, 2013 6:15 am
Forum: Homework
Topic: pumpkin-problem
Replies: 0
Views: 8258

pumpkin-problem

Hello everyone, for school i have to make a function that hangs pumpkins (= lampion in the code) on a horizontal line we already have a few functions in place : (define (lampion r l) (vc-append (filled-rectangle 2 l) (pumpkin r))) which makes a pumpkin on a vertical line (define (rijg-aan-draad lamp...
by jeltedeproft
Sun Oct 13, 2013 7:16 am
Forum: Homework
Topic: i dont understand this code
Replies: 1
Views: 6677

i dont understand this code

hy everyone, for homework i had to make a faculty function that used multiplication. so i made this : (define (fac a) (if (= a 1) 1 (* a (fac (- a 1))))) and it works, but the solution gave this : (define (fac n) (product (lambda (x) x) 1 (lambda (x) (+ x 1)) n)) and i dont understand what happens h...
by jeltedeproft
Fri Oct 11, 2013 3:12 am
Forum: Homework
Topic: error i am not able to correct
Replies: 3
Views: 9719

Re: error i am not able to correct

thanks perfect answer
by jeltedeproft
Thu Oct 10, 2013 6:57 am
Forum: Homework
Topic: error i am not able to correct
Replies: 3
Views: 9719

error i am not able to correct

Hello everyone, i am in my first year of computer programming and we are working with drracket, scheme for now. One of the tasks was to create a program to could display a certain character an "n" amount of times. as such : >(display-n c 5) ccccc here is my code : (define display-n (lambda...