Stuyvesant-HS-Intro-CS-Review-Sheet-MKS21

Jun 18th, 2015
Studypool Tutor
Alabama State University
Course: general
Price: $15 USD

Tutor description

THE “EQUAL” OPERATOR ONLY WORKS FOR NUMERIC COMPARISONS. FOR OTHER PURPOSES, SUCH AS COMPARING TRUTH VALUES, USE “EQUAL?”, EXPLAINED FURTHER BELOW. THERE IS NO “NOT EQUAL” FUNCTION BUILT INTO SCHEME. INSTEAD, USE “(NOT (= A B))”. Logic Connectors • and (both linked clauses must be true for the whole statement to be true) • or (either linked clause can be true for the whole statement to be true) • not (reverse of the truth value of the statement)

Word Count: 1587
Showing Page: 1/8
INTRO TO COMPUTER SCIENCE STUDY GUIDE TERM 1by Aaron LooSCHEME/RACKETArithmeticRemember to put the operation FIRSTCorrect: (+ 1 2)Incorrect: (1 + 2)There must be a space between each element, and there may be as many spaces as you please.Correct: (* 2 5)Incorrect: (*2 5)Operations available:+-*/expt (exponent, I.e (expt 2 3) = 2^3)sqrt (square root, I.e (sqrt 4) = 2)modulo (gives you the remainder of two #'s, I.e (modulo 21 2) = the remainder of 21/2)quotient (gives you the quotient rounded down to the nearest whole number of 2 #'s, I.e (quotient 21 2) 10)abs (absolute value, I.e (abs -2) = 2Compound ArithmeticScheme works from inside-out. Therefore:(/ (* 3 5) (+ 2 3)) (/ 15 5) 3Comparison OperationsComparison operators return a true or false valueLike arithmetic operations, the operation is placed at the beginning.I.e: (< 11 20) #t (< 21 20) #fComparison Operators:><=>=<=THE EQUAL OPERATOR ONLY WORKS FOR NUMERIC COMPARISONS. FOR OTHER PURPOSES, SUCH AS COMPARING TRUTH VALUES, USE EQUAL?, EXPLAINED FURTHER BELOW.THERE IS NO NOT EQUAL FUNCTION BUILT INTO SCHEME. INSTEAD, USE (NOT (= A B)).Logic Connectorsand (both linked clauses must be true for the whole statement to be true)or (either linked clause can be true for the whole statement to be true)not (reverse of the truth value of the statement)I.e:(and #t #t) #t(and #t #f) #f(or #f #t) #t(or #f

Review from student

Studypool Student
" Outstanding Job!!!! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1823 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors