A.(/ (10 / 20 + 8 4) (* 3 6 * 8 2 ))
B.((10 + (20 / (8 + 4))) / ((3 * 6) + (8 * 2)))
C.(/ (10 (/ 20 (8 4))) ((* 3 6) (* 8 2)))
D.(/ (/ 20 (10 (8 4))) (* (3 6) (8 2)))
第1题
(A) (define (f product counter max-count)(f (* counter product) (+ counter 1) max-count ));
(B) (define (f product counter max-count)(cond ((>counter max-count) product)((<= counter max-count) (f (counter*product) (counter+ 1) max-count )) ));
(C) (define (f product counter max-count)(cond ((>counter max-count) product)((<= counter max-count) (f (* counter product) (+ counter 1) max-count )) ));
(D) (define (f product counter max-count)(cond ((>counter max-count) product)((<= counter max-count) (f product counter max-count )) ));
第2题
已知:关于和的逻辑运算式如下:= (XOR) XOR= (AND) OR ((XOR) AND) 如果= 1,= 1,= 1,则,的值为______。
A、1,1
B、0,0
C、0,1
D、1,0
第5题
用条件运算符定义一个过程。正确的定义为_____。
A、(define (f x y) (cond ((x>y) (* x x x)) ((x=y ) 0) ((x <y ) (* y y))> B、(define (f x y) (cond ((> x y ) (* x x x)) ((= x y ) 0) ((< x y ) (* y y y)) ))
C、(define (f x y) (cond ((x>y) (x*x*x)) ((x=y ) 0) ((x <y ) (y*y*y))> D、(define (f x y) (cond ((< x y ) (* x x x)) ((= x y ) 0) ((> x y ) (* y y y)) ))
第6题
已知一个运算被定义为(define (firstCalc x) (* x x)),在其基础上进一步定义新运算secondCalc为++,下列运算组合式书写正确的是_____。
A、(define secondCalc (+ (firstCalc x) (firstCalc y) (firstCalc z)))
B、(define (secondCalc x y z) (+ firstCalc x y z))
C、(define (secondCalc x y z) (+ (firstCalc x) (firstCalc y) (firstCalc z)))
D、(define secondCalc x y z (+ (firstCalc x) (firstCalc y) (firstCalc z)))
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!