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.
There are two types of secondary memories.
- RAM
- ROM
RAM:
- RAM stands for random access memory .
- It is expandable.
- we can do multiple things in it.
- Its erasable.
ROM
- ROM stands for read only memory.
- It is permanent .
- We can only read in it.
- Its permanent hence not removable.
I think it is but it isn't as well, it could bring friends together but it could also split friendships.
Answer:
i need help om this someone plz answer
Explanation:
Answer:
A laser jet printer uses toner, while an inkjet printer sprays ink dots onto a page. Laser jet printers generally work faster than inkjet printers. Although inkjet printers are cheaper than laser jet printers, they are usually more expensive to maintain in the long run as ink cartridges have to be replaced more often. Thus, laser jet printers are cheaper to maintain. Laser jet printers are great for mass printing as they are faster and, as mentioned earlier, cheaper to replenish. Whereas inkjet printers are better for printing high quality images.