websites that can backup their answers so the first one:) im just thinking logically.
Answer:
def typeHistogram(it,n):
d = dict()
for i in it:
n -=1
if n>=0:
if str(type(i).__name__) not in d.keys():
d.setdefault(type(i).__name__,1)
else:
d[str(type(i).__name__)] += 1
else:
break
return list(d.items())
it = iter([1,2,'a','b','c',4,5])
print(typeHistogram(it,7))
Explanation:
- Create a typeHistogram function that has 2 parameters namely "it" and "n" where "it" is an iterator used to represent a sequence of values of different types while "n" is the total number of elements in the sequence.
- Initialize an empty dictionary and loop through the iterator "it".
- Check if n is greater than 0 and current string is not present in the dictionary, then set default type as 1 otherwise increment by 1.
- At the end return the list of items.
- Finally initialize the iterator and display the histogram by calling the typeHistogram.
Answer:
Data link layer enables the receiving node to send an acknowledgement.
Explanation:
The data link has following function;
1 it send the acknowledgement to the node because for the reliable transmission.
2.Data link layer provides the interface to the network layer.
3.it regulate the flow of data.
4.It control the transmission error.
The important function of data link layer it created packets of the data to send the packets in guarantee manner for giving the acknowledgement to the node that data is received successfully.
Answer:
are u sure this is the right question?
Explanation:
Answer:
A problem that occurs when two programs cannot run in the same computer at the same time. It is generally due to a programming bug and typically manifests when two programs compete for the same resource (memory, peripheral device, register, etc.).
Hope it helps out!
Explanation: