; ;; homework #1 (first read intro.sal and sexpr.sal) ; ;; 1. Use the 'print' command to print each the following things ; integer ; ratio ; float ; MIDI key number in 5th octave (the octave above the middle C octave) ; floating point key number that sounds 75 cents above Middle E (E4) ; floating point key number that sounds 50 cents BELOW Middle E ; ratio representing one beat ; ratio representing two-thirds of a beat ; ratio representing thee and two fifths beats ; strings representing the note names of ; key number 33 ; c-sharp in the third ocave ; quarter tone above c-sharp in the third octave ; b-flat in the zero octave ; f-double-sharp in the seventh octave ; d-natural in the third octave ; boolean false ; boolan true ; string ; list containing the names (symbols) of three dead composers ; list representing a twelve-tone row ; list of three triads, where each triad is a list of three key numbers ;; 2. write a 'print' expression that: ; adds two integers ; adds three to the divison of one by three ; raises 10 to the third power ; returns the modulus of -1 and 12 ;; 3. use the print statement to determine the true or falsity of each ;; of these propositions: ; 1 is EQUAL to 2 ; 1 is NOT EQUAL to 2 ; 1 is LESS THAN 1 ; 1 is GREATER THAN OR EQUAL to 1 ; true AND true ; 1 is LESS THAN 2 AND 4 is NOT EQUAL to 5 ; false OR false OR true ; false OR true AND true ; NOT true OR false ; NOT NOT true ;; 4. explain why 'NOT TRUE' is the same as 'FALSE' ;; 5. execute each of these two commands 10-15 times, then describe ;; the behavior of the function based on your observations: what is ;; the relationship of random's input value to its output value? random(3) random(3.0) ; explain here: ; 6. why does ran(3.0) gives us so many more possible values than ; ran(3) explain: ; 7. change this sexpr so that it will randomly print 5 6 or 7 instead of ; 0 1 or 2. random(2) ; 8. write a print statement using random that chooses any integer ; key number in the 6th octave ; 9. evaluate this define statement. then use the var[ ] notation to ; separately print each element from the variable's list variable test = {a b c d e} ; 10. use print command to print a list constructed by calling the ; list(...) function with the following inputs: the integer 10, a list ; using {} with two elements in it, the addition of 5 6