Answer:
- def check_subset(l1, l2):
- status = False
- count = 0
- if(len(l1) > len(l2)):
- for x in l2:
- for y in l1:
- if x == y:
- count += 1
-
- if(count == len(l2)):
- return True
- else:
- return False
-
- else:
- for x in l1:
- for y in l2:
- if x==y:
- count += 1
-
- if(count == len(l1)):
- return True
- else:
- return False
-
- print(check_subset([1,4,6], [1,2,3,4,5,6]))
- print(check_subset([2,5,7,9,8], [7,8]))
- print(check_subset([1, 5, 7], [1,4,6,78,12]))
Explanation:
The key idea of this solution is to create a count variable to track the number of the elements in a shorter list whose value can be found in another longer list.
Firstly, we need to check which list is shorter (Line 4). If the list 2 is shorter, we need to traverse through the list 2 in an outer loop (Line 5) and then create another inner loop to traverse through the longer list 1 (Line 6). If the current x value from list 2 is matched any value in list 1, increment the count variable by 1. After finishing the outer loop and inner loop, we shall be able to get the total count of elements in list 2 which can also be found in list 1. If the count is equal to the length of list 2, it means all elements in the list 2 are found in the list 1 and therefore it is a subset of list 1 and return true (Line 10-11) otherwise return false.
The similar process is applied to the situation where the list 1 is shorter than list 2 (Line 15-24)
If we test our function using three pairs of input lists (Line 26-28), we shall get the output as follows:
True
True
False
DDR memory is 64-bit so that means that it is 64
The answer is career clusters.
Answer:
Mouse - USB
Monitor - display port, HDMI, and thunderbolt port
External hard drive - USB and thunderbolt port
Flash drive - USB
Explanation:
A computer mouse is an input device used to interact with a computer system. It connects with the computer through the USB port.
A Monitor is an output device that is used to display information on a computer system. It can be connected to the system through the display ports, HDMI, and the thunder port.
The External hard drive is a storage device that holds data for a long period of time. It has adapters to connect to the computer through the USB ports or thunderbolt ports. The flash drive is similar in function to the hard drive but small in size and storage space. It only connects with the computer through USB ports.
Answer:
A BitTorrent software consumer utilizes that data into the torrent data to communicate special tracker and support shifting of that data among networks including either complete or incomplete representations about the data-set.
Explanation:
BitTorrent is based at the thought of any torrent, which is a smallish data that includes metadata regarding a host, specific tracker, that organizes the data sharing and data that is distributed. A peer that wants to advance data available need first attain a tracker for the data, generate a torrent and later share the torrent data. Different peers can next use the information included in the torrent file support all other in downloading that data. That download is organized by that tracker.