Answer:
new_segment = [ ]
for segment in segments:
new_segment.append({'name': segment, 'average_spend': money})
print( new_segment)
Using list comprehension:
new_segment =[{'name': segment, 'average_spend': money} for segment in segments]
Using map():
def listing(a):
contain = {'name': segment, 'average_spend': money}
return contain
new_segment = [ ]
new_segment.append(map( listing, segment))
print(list(new_segment)
Explanation:
The python codes above create a list of dictionaries in all instances using for loop, for loop in list comprehension and the map function which collect two arguments .
The number system is what is use globally as are way of counting the total number of digits is 9 because you can make any number with characters 1-9
Am not sure about no.2 and no.4
But am going to answer
1.true
3.true
5.true
Answer:
The answer to this question can be described as follows:
a) True
b) False
c) False
d) False
e) False
f) True
Explanation:
In option a, PATA device is used to connect the hard drives into systems. Its title suggests, depends on parallel transmitting technology, contrasted to the compulsive-signaling tools.
In option b, SATA1 is a first-generation device, and SATA3 third generation, that's why it is wrong.
In option c and option d, both were wrong because RAID 0 and RAID 5 are Cloud computing software for storing data.
In option e, An internal SATA data cable with an eSATA port can not be used as an additional connection is provided by the eSATA port.
In option f, It is true because there are 7 pins in internal SATA.
Answer:
The errors in the loop condition such that it is not giving desired results or it is not running accordingly.There are different types of loop errors which are as following:-
1.Infinite loop:-When the is not able to stop then the error is called infinite loop. for ex:-
int i=1;
while(i!=0)
{
cout<<"I am King"<<endl;
i++;
}
2.Off by one error:-This error mostly happens in loop for arrays as indexing of the array is from 0 to size-1 .So looping over the array up to the size is a off by one error.
3.Equality v/s assignment operator error:-In this error the condition in the loop is like this d=f which is wrong since = is assignment operator it assigns the value of f to d while d==f checks that the value of d and f are equal or not.
4.&& v/s || loop error:- In this error we use and operator (&&) instead of or operator (||) and vice versa.
symptoms of loop errors are not the desired output.