Answer:
result = 0
for i in range(99, 0, -1):
result += i
print(result)
Explanation:
Answer:
True: In binary search algorithm, we follow the below steps sequentially:
Input: A sorted array B[1,2,...n] of n items and one item x to be searched.
Output: The index of x in B if exists in B, 0 otherwise.
- low=1
- high=n
- while( low < high )
- { mid=low + (high-low)/2
- if( B[mid]==x)
- {
- return(mid) //returns mid as the index of x
- }
- else
- {
- if( B[mid] < x) //takes only right half of the array
- {
- low=mid+1
- }
- else // takes only the left half of the array
- {
- high=mid-1
- }
- }
- }
- return( 0 )
Explanation:
For each iteration the line number 11 or line number 15 will be executed.
Both lines, cut the array size to half of it and takes as the input for next iteration.
Answer:
True
Explanation:
In a web page, there are two categories of content, they are, the main content and the supplementary content.
The main content holds the needed information of the web page and changes from page to page, while the supplementary content, as the name implies, supports the quality of the main content. It content can be duplicated in multiple pages and does not need a high rating to promote the quality of a web page.
Answer:
see my discussion as explained bellow
Explanation:
D)no one
..........................................