Question: Using racket software Q 1 ( 1 5 pts ) . Write scheme code to calculate the following equations: a . 2 4 + 3
Using racket software
Q pts Write scheme code to calculate the following equations:
a
b
c
Q pts Write a scheme function named number Type that takes one number parameter
and returns one of the following strings using an if statement: "Positive odd", "Positive even",
"Negative odd", "Negative even", "Zero". Define a list L having numbers
and apply your function to each element of your list. The output should be
Positive odd" "Negative even" "Zero" "Positive even" "Negative odd"
"Positive odd" "Negative even"
Q pts Define and c as using let and change the first element of b with
by getting the tail of b and adding as new head. Your code should print
Q pts Write a scheme function named Multipleor that returns true if the number
is divisible by or false otherwise. Filter all numbers divisible by or in a list containing
Q pts Write scheme expressions with car's and cdrs to access symbol D for each of the
following lists. Note that you can combine at most car's or cdrs using shorter notation such as
cdadar L If you need to use more, you can write it separately such as cadar cdadar L
a
bABCDEF
cABCD
d
e
Q pts Write a nontail recursive scheme function countStrings that returns the
number of strings in a list. You can use string? function to check each list element. For instance,
countStrings P #t "abc" should return
Q pts Write a tail recursive version of the same function named countStrings T that
returns the number of strings in a list. Your function should get a second argument to store
accumulated result. For instance, countStringsT P #t "abc"
should return
Q pts Write a tail recursive scheme function named difference that takes two lists
should return as the sum of differences of elements
Assume that the lists only contain numbers. So you don't need to check the types.
Your function should stop when it reaches the end of any list. For instance, difference
Q pts Write a scheme function named sequence that takes two number parameters I
and and returns a list that contains the sequence of numbers by a difference of from I to
u You can write your function tail recursive or nontail recursive. For instance, sequence
should return :sequence should return
sequence should return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
