logo

Crowdly

Browser

Додати до Chrome

Let's say that we are entering expressions in the Scheme repl (i.e., the  comm...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Let's say that we are entering expressions in the Scheme repl (i.e., the  command line interpreter that always produces an output after an expression is evaluated. )

We first enter:

(define (foo x y)  (if (zero? (mod x y)) x      (sqrt y)  ))

(Note that mod is the name of the modulo function (i.e., remainder) in newer versions of Scheme, and sqrt is of course square root.)

This function is accepted by the repl and we then enter

(foo 16 4)

What would you expect the repl to display after foo is invoked? (note that no errors are produced by this code)

0%
0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.concordia.ca?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome