Answer:
from collections import Counter
def anagram(dictionary, query):
newList =[]
for element in dictionary:
for item in query:
word = 0
count = 0
for i in [x for x in item]:
if i in element:
count += 1
if count == len(item):
newList.append(item)
ans = list()
for point in Counter(newList).items():
ans.append(point)
print(ans)
mylist = ['jack', 'run', 'contain', 'reserve','hack','mack', 'cantoneese', 'nurse']
setter = ['ack', 'nur', 'can', 'con', 'reeve', 'serve']
anagram(mylist, setter)
Explanation:
The Counter class is used to create a dictionary that counts the number of anagrams in the created list 'newList' and then the counter is looped through to append the items (tuple of key and value pairs) to the 'ans' list which is printed as output.
Answer: False
Explanation: An Information Package is a conceptual container of two types of information called Content Information and Preservation Description Information (PDI). The Content Information and PDI are viewed as being encapsulated and identifiable by the Packaging Information.
nformation Packages – novel idea for determining and recording information requirements for a data warehouse. Determining requirements for a data warehouse is based on business dimensions. The relevant dimension and measurements in that dimension are captured and kept in a data warehouse.
Answer:
This article discusses different ways to reverse a string in Java with examples.
Explanation:
The working principle of the computer system. Computers do the work primarily in the machine and we can not see, a control center that converts the information data input to output. This control center, called the central processing unit (CPU), How Computers Work is a very complex system.
Answer:
It will print x = 11
Explanation:
x starts with a value of 2 and goes inside the while loop. The loop will continue until x<10. Inside the loop, If x is even number, 3 will be added to x. Otherwise, 2 will be added. When the loop is done, x will be printed.
First iteration:
x = 2, x becomes x + 3 = 5, Is x smaller than 10? YES
Second iteration:
x = 5, x becomes x + 2 = 7, Is x smaller than 10? YES
Third iteration:
x = 7, x becomes x + 2 = 9, Is x smaller than 10? YES
Forth iteration:
x = 9, x becomes x + 2 = 11, Is x smaller than 10? NO
Stop the loop and print x