;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname moniosainen-laskulauseke-ratkaisut) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) ;;Racket 1 ;;1. Ohjelmointiympäristö ;;1.3 Moniosainen laskulauseke ;;Tehtäväsarja 2: Moniosainen laskulauseke ;;Tehtävä 1 a) (+ 10 (- 12 19)) ;Vastaus: 3 ;;Tehtävä 1 b) (- 45 (+ 22 30)) ;Vastaus: -7 ;;Tehtävä 1 c) (+ 12 (- 13 14)) ;Vastaus: 11 ;;Tehtävä 2 a) (+ 4 (* 3 6)) ;Vastaus: 22 ;;Tehtävä 2 b) (- (* 6 5) 3) ;Vastaus: 27 ;;Tehtävä 2 c) (- 20 (* 3 5)) ;Vastaus: 5 ;;Tehtävä 3 ;;Ratkaisu riippuu oppilaan keksimästä laskukausekkeesta. ;;Tehtävä 4 (* 10000 999999) ;Vastaus 9999990000 ;;Racketissa pystyy laskemaan hyvinkin isoilla luvuilla.