1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Artyom0805 [142]
3 years ago
10

Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of

another set (represented as a list).
Computers and Technology
1 answer:
mafiozo [28]3 years ago
4 0

Answer:

subset([],[]).

       subset([X|L],[X|S]) :-

           subset(L,S).

       subset(L, [_|S]) :-

           subset(L,S).

Success:

     subset([1,3], [1,2,3]).

     subset(X, [1,3,4]).        % error handling to compare sets in a given order

Fail:

     subset([2,1], [1,2,3]).   % compares in a different order from the first.

Explanation:

The function "Subset" in the source code above accepts two sets, then checks if the first set is a subset of the second. The code returns true if the condition is met.

You might be interested in
50 ) What is the cell address of 4th row and 4th column? A) 4D B) E4 оооо C) 04 D) B4​
blsea [12.9K]

Answer:

The cell address of 4th row and 4th column is

4D/D4

7 0
3 years ago
The _____ element, a hypertext markup language (html) metadata element, contains a collection of metadata elements that describe
Butoxors [25]
The "head" element, a hypertext markup....
Missing word is head
5 0
3 years ago
Read 2 more answers
It can be hard to get close enough to photograph animals in the wild true or false
marysya [2.9K]

Answer:

True

Explanation:

8 0
3 years ago
Read 2 more answers
In a C++ program, two slash marks ( // ) indicate:
Ganezh [65]

Answer:

The option(B) is the correct answer .

Explanation:

In C++  the // (two slash marks ) indicating the beginning of a comment .The two slash marks ( // ) comment the single line in a program.To use two slash marks ( // ) comment we simply write  // in which line we have to make comment.

following are the example of code in c++

#include<iostream.h> // header file

void main() // main method

{

cout<< " india"; // print india

}

here // indicating the beginning of a comment .

5 0
3 years ago
Files exist on ____ storage devices, such as hard disks, dvds, usb drives, and reels of magnetic tape.
Verdich [7]
<span>Files exist on data storage devices, such as hard disks, DVDs, USB drives, and reels of magnetic tape.
</span>Data storage<span> is the recording (storing) of information (data) and </span><span>these data storage devices use</span> a technology consisting of computer components and recording media used to retain digital data.DVDs, USBs and hard disks are examples for external data storage devices.
8 0
3 years ago
Other questions:
  • Assume arr2 is declared as a two-dimensional array of integers. Which of the following segments of code successfully calculates
    6·1 answer
  • Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Sample Run Enter a Number: 98 Sample Output
    7·1 answer
  • Which technique helps you look confident as a speaker?
    15·1 answer
  • ) Which is true about the agile method?
    7·1 answer
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
  • A social cause is: O A. when one person protests without the support of others. B. something that not many citizens think or car
    8·1 answer
  • What are stored procedures? What kind of attack do stored procedures protect from? Identify two reasons why stored procedures ar
    14·1 answer
  • Classroom content transaction <br> examples use of IT
    8·1 answer
  • 23. Convert the following to Megabytes<br> a) 2GB<br> b) 2056 Bytes-
    8·2 answers
  • _____ allows a function or operator to perform different tasks depending on the types of the arguments or operands. Group of ans
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!