Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

9For ee s rohor deling about types declarations,scope, and enguage, submit a rep

ID: 3750536 • Letter: 9

Question

9For ee s rohor deling about types declarations,scope, and enguage, submit a report telling about types, declarations, scope, and assignments in your language. Cite all of your sources for each specific answer. Include code to support your findings. Make sure your explanations fully address the following clude a short-program-such-as the balanee+ deposit program b. Does your language use copy or reference semantics? Or both? c. Does your language use mutable or immutable variables, or both? d. Does your language have operator precedence rules? Rules for associativity? Explain. Write a short program showing the evaluation of 3+2*4 and of 6/3/2 in your language.fRefer to your chapter-2-report) e. Does your language use eager or lazy evaluation of Booleans? f. Discuss the mathematics library for your language and provide a reference. g. Does your language allow assignment expressions? h. Can you write multiple assignments in one statement?

Explanation / Answer

b.) Both pass by value and pass by reference

c) It uses both mutable and immutable variables

d) Yes, Ruby follow operator precedence rule.

e) Ruby follows 'lazy' loading.

f) some math library of rudy are:

Math.sqrt, Math.sqrt! -> Square root

Math.frexp-> Normalized fraction and exponent

math.erf=> Error function

Math.acos, Math.acos!, Math.asin,Math.asin!, Math.atan, Math.atan!

6) Yes, Ruby allows assignment expresion '='

7) Yes, we can write multipe assignment in one statement. like

here array assign to c then c to b finally b to a.