Answer:
The time complexity of the code is O(log₇n).
Explanation:
The i is updated by 7*i.On each iteration i is multiplied by 7.So on finding the time complexity of the code given above it will come out to be log base 7.
When we divide the input by 2 the time complexity is log base 2.
So on dividing it by 7 we get the time complexity of log base 7.
Alice has twice as many pencils as Cara. Leon has three more pencils than Alice. The three children have a total of 58 pencils.
<h3>
What are the no. of pencils?</h3>
The no. of pencils are there totally as the 11.
Read more about the basic maths:
brainly.com/question/19493296
#SPJ1
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).
There're all conjunctions.
You can seperate them in sentences after a comma for a run-on sentence.