Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started