Answer:
right click and press control c
Answer:
Worst case time of Heapsort is better than worst case time of Quicksort.
Explanation:
Worstcase of Heapsort is nlog(n). Worstcase time of Quicksort is (n^2). Heapsort is comparison based sorting algorithm. Heapsort divides input into sorting. It is a selection sort in which we send maximum inputs for maximum elements at end. Quicksort is divide and conquer algorithm. It is considered as efficient sourcing algorithm.
Answer:
The answer is A I hope this helps, if not I apologize.
Explanation:
Answer:
def newton(n):
#Define the variables.
t = 0.000001
esti = 1.0
#Calculate the square root
#using newton method.
while True:
esti = (esti + n / esti) / 2
dif = abs(n - esti ** 2)
if dif <= t:
break
#Return the result.
return esti
#Define the main function.
def main():
#Continue until user press enters.
while True:
try:
#Prompt the user for input.
n = int(input("Enter a number (Press Enter to stop):"))
#display the results.
print("newton = %0.15f" % newton(n))
except:
return
#Call the main function.
main()
The value of result of the code segment is executed is known to be 4.
<h3>Why is the value of the code segment so?</h3>
When the result of is not executed because the condition is said to be false and also when there is a false condition is, the else statement will be said to be true
Therefore, result = result + 2; -> result is brought up by 2 to bring about 4 and as such, the value of result of the code segment is executed is known to be 4.
Learn more about scores from
brainly.com/question/19492935
#SJ1