You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exercise description for w04 exercise 7c asks the student to draw a square with its upper left corner at (100, 100). It gives the following code as a start:
1 > curl -sLO https://fileadmin.cs.lth.se/introprog.jar
2 > scala -cp introprog.jar
3 scala> val w = new introprog.PixelWindow(400,300,"HEJ")
4 scala> w.line(100, 100, 200, 100)
5 scala> w.line(200, 100, 200, 200)
6 scala> // fortsätt så att en hel kvadrat ritas
This seems correct, however the answer key ("facit") lists the following solution:
Which uses functions that don't actually exist in the PixelWindow API, leading to errors and thus great confusion and sadness. The functions used seem to possibly be assuming a "turtle" style drawing, like in Kojo?
The text was updated successfully, but these errors were encountered:
The exercise description for w04 exercise 7c asks the student to draw a square with its upper left corner at (100, 100). It gives the following code as a start:
This seems correct, however the answer key ("facit") lists the following solution:
Which uses functions that don't actually exist in the PixelWindow API, leading to errors and thus great confusion and sadness. The functions used seem to possibly be assuming a "turtle" style drawing, like in Kojo?
The text was updated successfully, but these errors were encountered: