Questions tagged [wescheme]

Wescheme is a language based on Racket and Scheme that compiles to JavaScript.

WeScheme is an online programming environment based off of DrRacket and Scheme. In contrast to DrRacket, it evaluates on the browser with JavaScript. It is targeted for introductory programming; its main audience is the Bootstrap curriculum, a middle-school curriculum for teaching algebra through programming, though it is also being used in other college, high school, and middle school settings.

6 questions
4
votes
1 answer

How to print WeScheme programs?

If it is a small program that fits into the screen, the default Print option in the browser does a good job. However, the colour combinations are not necessarily ideal for a print-out. When the length of the program does not fit the screen, the…
lifebalance
  • 1,846
  • 3
  • 25
  • 57
3
votes
2 answers

Scheme code cond error in Wescheme

Although the following code works perfectly well in DrRacket environment, it generates the following error in WeScheme: Inside a cond branch, I expect to see a question and an answer, but I see more than two things here. at: line 15, column 4, in…
lifebalance
  • 1,846
  • 3
  • 25
  • 57
2
votes
3 answers

Translation of Scheme code for Sierpinski carpet

I found code for generating Sierpinski carpet at http://rosettacode.org/wiki/Sierpinski_carpet#Scheme - but it won't run in the DrRacket environment or WeScheme. Could someone provide solutions for either environments?
lifebalance
  • 1,846
  • 3
  • 25
  • 57
2
votes
2 answers

How to add Modules to WeScheme

I am currently working on a program, that uses images and need to add the module mentioned in this question (require 2htdp/image) I come up the the error I see a require of the module 2htdp/image, but I don't yet know what this module is. How do I…
Liam McInroy
  • 4,339
  • 5
  • 32
  • 53
1
vote
1 answer

Don't know how to round a number in racket

I'm trying to solve a problem in racket that I need to get a student's grade and put it inside a star. But if the grade has more than one decimal case I need to round it to show only 1. Ex: If the grade is 8.67 it should show 8.7. But I can't figure…
1
vote
0 answers

How to use overlay in wescheme

I want to use overlay function so that instead of 2 empty-scene i only get 1 empty-scene and both bitmaps are in the same empty-scene: (define (grc r) (bitmap/url…