[SOLVED] ; Test 1 Reminder Aid Sheet Monday Oct 14 DRAFT ; A program is a sequence of expressions and statements.

$25

File Name: ;_Test_1__Reminder_Aid_Sheet__Monday_Oct_14_DRAFT_;_A_program_is_a_sequence_of_expressions_and_statements..zip
File Size: 998.52 KB

5/5 - (1 vote)

; Test 1Reminder Aid SheetMonday Oct 14 DRAFT ; A program is a sequence of expressions and statements.
; ! Expression Forms ! ; Literal Value
functionname ; function by name from a definition or from our language true false ; boolean
list literalvalue etc ; list
; insertedpasted image
n.n nn ; number as decimal or fraction characters ; text
; Variable Reference : variablename ; from a definition or from our language ; Function Call : functionname argumentexpression etc
; Conditional
if conditionexpression consequentexpression else alternativeexpression
; ! Statement Forms !
; Definition of a Variable or Function
define variablename valueexpression
define functionname parametername etc ; header
; ! Equality Predicate : true! same?1 1 2 false! same?1 1 3 ; ! Type Predicates !
bodyexpression ; AssertionTest
same! expression expression
step expressionif true consequentexpression
else alternativeexpression consequentexpression
if false consequentexpression else alternativeexpression
alternativeexpression
if nonbooleanliteral ; an error
if conditionexpression ; evaluate condition firstfunctionname literalvalue etc; except literal lists

same! scalewidth
same! wider same! thinner
1.5
1.5

15
; Reveal Algebraic Evaluation
same! scale same! shrink
1.5
same! scaleheight
same! taller same! shorter
same! triangle 9
; ; ;
; ; ;
; ;
For a function from a definition: copy its body and substitute the arguments in place of the parameter names wherever the names occur in the body.if number of arguments doesnt match number of parameters: an error
For combine or map : match its rules first pattern to determine f a b c then substitute those into its rules second pattern the template.
if the expression doesnt match its pattern: an error
map f list a b c etclistf af bf cetc
combine f list a b c etcf a b cetc
For any other function from our language: substitute directly computed value.if wrong number or type of arguments for that function : an error
variablename literalvalue

;
Substitute the value that was computed when the variable was defined.
true! conditionexpression false! conditionexpression
same! rotate
same! clockwise same! anticlockwise

true! function? flip true! boolean? false true! text? Hi!
true! list? list ztrue! number? 12
true! image?
; ! Function Predicates : true! unary? flip false! binary? flip ; ! List Functions !
same! list filledtriangle 9 zero? 02 3 hi list true 5 hi
same! maplist 3 1 same! combinelist
true! empty? list same! length list
7 list 3 1 7 3 1 7 11
true 5 hi 4
same! first list same! rest list same! reverse list
; ! Image Functions !
same! mirror same! flip
true 5 hi
true 5 hi list true 5 hi
true 5 hi list hi 5 true
same! filledcircle
same! filledsquare
same! filledoval
same! filledrectangle 9 15
same! enlarge
same! filledtriangle 9
same! width oval 9 15
9

same! above
same! alignlefts same! alignrights
; ! Numeric Functions !

same! beside
same! aligntops
same! alignbottoms

30
9
99 15
same! circle same! square
9 9
same!210315 same!1212 same!inc2021 same!2 10 3 60 same!12 3 9 same! dec 20 19
same!12 3 4
true! zero? 0 false! positive? 3
true! positive? 12 false! positive? 0 ; ! Text Functions !
same! textlength one 3 same! textjoin Hihuman!
Hi human!
same! textimage Hi! same! textlist Hi!
list H i !

9 same! rectangle 9
same! oval

same! height oval 9 15 15
15

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] ; Test 1 Reminder Aid Sheet Monday Oct 14 DRAFT ; A program is a sequence of expressions and statements.
$25