Question: DO IN RACKET PROGRAMMING Problem 3 [6pt] Implement two racket functions in hw7.rkt that manipulate lists. a) (4pts) Write a function sequence that takes 3

 DO IN RACKET PROGRAMMING Problem 3 [6pt] Implement two racket functions

DO IN RACKET PROGRAMMING

Problem 3 [6pt] Implement two racket functions in hw7.rkt that manipulate lists. a) (4pts) Write a function sequence that takes 3 arguments low, high, and fac, all assumed to be positive integers. Further assume factor is greater than 1. sequence produces a geometric sequence from low to high (including low and possibly high) where the sequence has a factor of fac between each two numbers. If low is greater than high, the sequence should be an empty list. > (sequence 1 100 2) (1 2 4 8 16 32 64) > (sequence 20 19 2) "O) > (sequence 20 1000 3) (20 60 180 540) b) (2pts) Write a function sum that returns the sum of all numbers of a list. It returns 0 if the list is empty. (sum' (1 2 3)) 6 > (sum! ( ) 0 (sum' (1.1 2.2 3.3 4.4 5.5 100)) 116.5 >

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!