The Racket Student Languages are a set of small languages meant to be used with the book How to Design Programs. They include Beginning Student Language (BSL and BSL+), Intermediate Student Language (ISL), Intermediate Student Language with Lambda (ISL+), and Advanced Student Language (ASL)
Questions tagged [racket-student-languages]
38 questions
0
votes
1 answer
Stuck while writing a recursion function in racket beginner language?
So recently I learned recursive function and I am trying some exercise then I am just stuck.
Question is
list-nth-item, that consumes a list, (lst), and a natural number, (n), and
produces the n-th element in lst if exists, otherwise the function…
Arya
- 11
- 7
0
votes
1 answer
In racket how do I replace word in string using string->list or list->string function only?
So I was practicing racket beginner language when I came along this question.
Write a function str-replace which consumes a string, a target character, and a
replacement character. The function produces a new string, which is identical to the…
Arya
- 11
- 7
0
votes
1 answer
How to pass variables to 'text' in racket
I have to create the above image
The text inside is variable. What I mean is that I want to pass 2 values to it for display and these values keep changing.
I am trying this:
(define (circle-text vx vy)
(underlay/align "center"
…
user3868051
- 689
- 1
- 9
- 32
0
votes
1 answer
Need help understanding function in BSL (DrRacket)
Language BSL - DrRacket (racket variant)
Problem: I need to understand what the function below does exactly. Specifically the substring bit, I don't understand how it determines whether a string has an "?" at the end in choosing whether to append…
Steve Henderson
- 51
- 6
0
votes
1 answer
How do I create a version of filter using map (racket ISL)
I am Tasked (in exercise 8) with creating a function in Intermediate Student Language (Racket) that receives a list of numbers and a list of lists of numbers; each list is the same length. Name the first list breakpoints and the second LoR (list of…
Griffin Tennent
- 1
- 1
0
votes
1 answer
Scheme Beginning Student, Function Body Extra Part
I attempted to follow the solution provided in this question, but it simply didn't work.
Essentially, my function works like so:
(define (item-price size normal-addons premium-addons discount)
(define price 0)
(+ price (* normal-addon-cost…
Kade
- 151
- 1
- 10
-1
votes
1 answer
Racket: Insert new nodes into a binary search tree
lets say we have a binary tree structure:
(define-struct tree-node (left right node))
I'm having trouble with creating a binary search tree. My main problem is, I don't know how to insert a node into a tree or to overwrite left or right in…
bran11
- 1
- 3
-1
votes
2 answers
Can I divide list into multiple parts in BSL?
I have the list of values and want to take first x values from it and create (list (listof first x values) (listof next x values) and so on until this list gets empty...).
For example, given this list: (list "a" "b" "c" "d" "e" "f" "g" "h"…
L.L
- 1