Answer:
def sum_1k(M):
s = 0
for k in range(1, M+1):
s = s + 1.0/k
return s
def test_sum_1k():
expected_value = 1.0+1.0/2+1.0/3
computed_value = sum_1k(3)
if expected_value == computed_value:
print("Test is successful")
else:
print("Test is NOT successful")
test_sum_1k()
Explanation:
It seems the hidden part is a summation (sigma) notation that goes from 1 to M with 1/k.
- Inside the <em>sum_1k(M)</em>, iterate from 1 to M and calculate-return the sum of the expression.
- Inside the <em>test_sum_1k(),</em> calculate the <em>expected_value,</em> refers to the value that is calculated by hand and <em>computed_value,</em> refers to the value that is the result of the <em>sum_1k(3). </em>Then, compare the values and print the appropriate message
- Call the <em>test_sum_1k()</em> to see the result
Answer:
c. developer
Explanation:
DEVELOPER TOOLS are tools that enables designers to easily and quickly edit web page and as well diagnosed issues or problem on a website which will inturn enables them to build a great and better websites without stress reason been that when a designer makes use of DEVELOPER TOOLS they can quicky track down and as well fix the problem that was diagnosed within a minute or seconds thereby saving time when developing a website profile.
Answer:ENTER
Explanation: Hyperlink is the situation that states that the document belongs to some other location. So, if the enter key is pressed by the user after the typing of any email address , then it marks it as the hyperlink which shows it belongs to some other file.
Hyperlink actions also occurs when the user presses space-bar and the web address gets marked by the change in color or by underlined function.
Name resolution is done using DNS servers. DHCP provides a client with a list of DNS servers via option 6, "DNS Server".
// Writing a C++ Program for the given senario
#include<iostream> // Using input and output stream
using namespace std; // Using standard namespace
// Main function
int main(){
int num = 10; // int num initialized with 10
double cost =1000; // double cost initialized with 1000
/*
Cout is stream in C++ that uses << symbol to output anything on the screen and as the problem says we need to output both numbers on a line, i have used multiple << because on cout streams you are allowed to send one element at a time.
Also, endl is a keyword in C++ that ends the line after output for the cout stream is finished.
*/
cout<< num << " " << cost <<endl;
// Return 0 means telling the compiler to terminate the //program
return 0;
}