A digital citizen refers to a person who has the knowledge and skills to effectively use digital technologies to communicate with others, participate in society and create and consume digital content. Digital citizenship is about confident and positive engagement with digital technologies. Digital citizenship refers to responsible technology usage, and teaching digital citizenship is essential to helping students achieve and understand digital literacy, as well as ensuring cyberbullying prevention, online safety, digital responsibility, and digital health and wellness.
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.
It has to be two people answering.Then vote braniest to who's answer you think is better.
Answer:
punctuation_chars = ["'", '"', ",", ".", "!", ":", ";", '#', '@']
def strip_punctuation(strWord):
for charPunct in punctuation_chars:
strWord = strWord.replace(charPunct, "")
return strWord
Explanation:
The function is defined with a single argument.
A for loop is ran to check each character of the the word.
If a punction mark is present as a character in the word, it is removed.
The same word is returned but without the punctuation marks.