Answer:
# Code in Python
dictionary={'A':1,'B':2,'C':3,'D':4}
other_dictionary={}
for keys in dictionary:
if dictionary[keys]&1==1:
temp=dictionary[keys]*dictionary[keys]-10*10
other_dictionary[keys]=temp
else:
other_dictionary[keys]=dictionary[keys]
print(other_dictionary)
assert other_dictionary
Explanation:
- Initialize a sample example dictionary and other_dictionary.
- Do a binary comparision for checking odd number
.
- Update the the value stored in the dictionary to store the squared difference of the original value and '10'.
- For even: store the original value (from dictionary).
#1 is A and #2 is B, but I don't know about #3 and #4.
Answer:
The Data Access Object pattern is a structural pattern that allows us to isolate the application/business layer from the persistence layer
<h2>I'm not sure but tell me if its right or wrong in order to help others</h2>
Explanation: