Answer:
(a): power(2&-2)
The code is as follows:
<em>power = 2**-2</em>
<em>print(power)</em>
<em />
(b): Largest and smallest in a list
The code is as follows:
<em>num = [33,6,11,100,456,109,-4,366]</em>
<em>smallest= min(num)</em>
<em>largest= max(num)</em>
<em>print(smallest)</em>
<em>print(largest)</em>
<em />
(c): Loop in Python
(i) Loop are instructions that are repeated until a certain condition is met;
(ii) For loop, in python are used to iterate over a sequence or through a certain range;
The syntax is:
<em>for loop_element in range(iterating_range):</em>
The following is an illustration of for loop that iterates 5 times
<em>for i in range(5):</em>
Explanation:
(a): power(2&-2)
The ** is used to calculate power.
So, 2**-2 represents 2 raise to power -2
<em>power = 2**-2</em>
This prints the calculated power
<em>print(power)</em>
<em />
(b): Largest and smallest in a list
This initializes the list
<em>num = [33,6,11,100,456,109,-4,366]</em>
This calculates the smallest using min() function
<em>smallest= min(num)</em>
This calculates the largest using max() function
<em>largest= max(num)</em>
This prints the smallest and the largest
<em>print(smallest)</em>
<em>print(largest)</em>
<em />
(c): See answer section