Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Istanbul Bilgi University

Department of Computer Engineering

Fall 2023-2024

CMPE 100: Introduction to Computing

Worksheet 02

1. Define two variables as given below


(define str "helloworld")
(define i 5)
Create an expression such that places ” ” at position i. For example, the resulting
string is ”hello world” according to the given values. Assume that str="BilgiUniv"
and i=3, the result is ”Bil giUniv”. Test your expression with different str and i
values to validate that it works properly.

2. Run the followings and make sure you understand the value expressions:
(circle 100 "solid" "red")
(place-image (circle 100 "solid" "red") 10 40 (rectangle 200 300 "solid"
"green"))
(empty-scene 200 200)
(place-image (circle 100 "solid" "red") 10 40 (empty-scene 200 200))

3. Draw the following image. Make sure that your code is written clean and readable.

4. Modify your code such that only one variable controls the size of all circles. By single
variable change, the overall image size must change but the placement of the circles
must be kept. Test your code with different size variables to validate that it works
properly. Use comments (;) to explain your code.

You might also like