Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CSE 240 TEST PAPER 2026 EXAM QUESTIONS AND SOLUTIONS RATED

Beoordeling
-
Verkocht
-
Pagina's
6
Cijfer
A+
Geüpload op
06-04-2026
Geschreven in
2025/2026

CSE 240 TEST PAPER 2026 EXAM QUESTIONS AND SOLUTIONS RATED

Instelling
CSE 240
Vak
CSE 240

Voorbeeld van de inhoud

CSE 240 TEST PAPER 2026 EXAM QUESTIONS AND
SOLUTIONS RATED A+
✔✔Given the Scheme code below, answer the following question related the Fantastic
Four abstract approach.

(define dtob (lambda (N) ; line 1
(if (= N 0) (list 0) ; line 2
(append (dtob (quotient N 2)) ; line 3
(list (remainder N 2)))))) ; line 4

What line of code contains the size-M problem, where M < N? - ✔✔line 3

✔✔Given the Scheme code below, answer the following question related the Fantastic
Four abstract approach.

(define dtob (lambda (N) ; line 1
(if (= N 0) (list 0) ; line 2
(append (dtob (quotient N 2)) ; line 3
(list (remainder N 2)))))) ; line 4

What lines of code define the step that construct the solution to size-N problem? -
✔✔lines 3 and 4

✔✔What is equivalent to the expression below?

(car (cdr '(1 2 3 4 5)) - ✔✔(cadr '(1 2 3 4 5))

✔✔Given this expression, what is the expected result?

(car (cdr '(1 2 3 4 5)) - ✔✔2

✔✔Which of the following programming languages most closely follows the stored
program concept? [C, Lisp, Prolog, Scheme] - ✔✔C

✔✔Storage of instructions in computer memory to enable it to perform a variety of tasks
in sequence or intermittently - ✔✔stored program concept

✔✔Prolog is based on [Boolean logic, lambda calculus, predicate logic, Turing
machine]. - ✔✔predicate logic

✔✔There are three kinds of clauses in a Prolog program: facts, goals, and rules. Which
of the following is true: A) A fact can be considered a special case of a goal, B) A fact

, can be considered a special case of a rule, C) A rule can be considered a special case
of a goal, or D) A rule can be considered a special case of a fact. - ✔✔B

✔✔What mechanism cannot be used for passing values between clauses within a
Prolog rule? [call-by-alias, call-by-value, return value, all of the above] - ✔✔return value

✔✔If you want to pass multiple values out of a Prolog rule, which of the following
methods is valid? A) Use multiple named variables to hold the values, or B) Use
multiple return statements in the predicate - ✔✔A

✔✔A goal clause and a fact unify if [their arities are the same, their corresponding
arguments match, their predicates are the same, all of the above]. - ✔✔all of the above

✔✔The arity of a predicate is the [body, head, neck, number of arguments] of the
predicate. - ✔✔number of arguments

✔✔The scope of a Prolog variable is within A) a single clause in a rule, B) a single rule,
C) the body of the next rule, or D) the fact/rule base. - ✔✔B

✔✔When will a circular definition of a Prolog rule cause a dead-loop? - ✔✔when no
match can be found

✔✔What is an anonymous variable in Prolog called? - ✔✔placeholder

✔✔What is the output when the following Prolog goal is executed?

?- member(apple, [orange, apple, pear]). - ✔✔true?

✔✔Assume we have the following fact in a Prolog factbase: child_of(mary, [amy, david,
conrad]). What is the output when the following goal is executed? ?- child_of(mary,
[amy | T]). - ✔✔T = [david, conrad]

✔✔Assume we have the following fact in a Prolog factbase: child_of(mary, [amy, david,
conrad]). What is the output when the following goal is executed? ?- child_of(mary,
[amy | [H | conrad]]]). - ✔✔H = david

✔✔What is the output when the following Prolog goal is executed? ?- member(X, [81,
25, 9, 29]), Y is X*X, Y=400. - ✔✔X=9 X=81

✔✔Given the following recursive rules in Prolog:
foo(X, [X]).
foo(X, [ _ | T]) :- foo (X, T).

Geschreven voor

Instelling
CSE 240
Vak
CSE 240

Documentinformatie

Geüpload op
6 april 2026
Aantal pagina's
6
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$13.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
BOARDWALK Havard School
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
250
Lid sinds
1 jaar
Aantal volgers
7
Documenten
28034
Laatst verkocht
2 dagen geleden
BOARDWALK ACADEMY

Ace Your Exams With Top Quality study Notes And Paper✅✅ ALL ACADEMIC MATERIALS AVAILABLE WITH US✅✅ LEAVE A REVIEW SO THAT WE CAN LOOK AND IMPROVE OUR MATERIALS.✅✅ WE ARE ALWAYS ONLINE AND AVAILABLE DONT HESITATE TO CONTACT US FOR SYUDY GUIDES!!✅✅ EVERYTHING IS GRADED A+✅✅ COLOUR YOUR GRADES WITH US , WE ARE HERE TO HELP YOU DONT BE RELACTANT TO REACH US

3.5

36 beoordelingen

5
14
4
6
3
8
2
1
1
7

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen