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++ code is given below
Explanation:
#include <iostream>
#include <cctype>
#include <string.h>
#include <cstring>
#include <sstream>
using namespace std;
struct Car {
public:    
char reportingMark[5];    
int carNumber;
string kind;
bool loaded;
string destination;
};
void input(Car *);
void output(Car *);
int main() {
Car *T = new Car;    
input(T);
output(T);    
delete T;    
return 0;
}
void input(Car *T)
{
string str, s;
cout << " Enter the reporting mark as a 5 or less character uppercase string: ";
cin >> str;
for (int i = 0; i < str.length(); i++)
T->reportingMark[i] = toupper(str[i]);
cout << " Enter the car number: ";
cin >> T->carNumber;
cout << " Enter the kind: ";
cin >> T->kind;
cout << " Enter the loaded status as true or false: ";
cin >> s;    
istringstream(s) >> boolalpha >> T->loaded;    
if (T->loaded == true) {
cout << " Enter the destination: ";
cin.ignore();
getline(cin, T->destination);
}
else
T->destination = "NONE";    
}
void output(Car *T)
{
cout << " Reporting Mark: " << T->reportingMark;
cout << " Car Number: " << T->carNumber;    
cout << " Kind: " << T->kind;
cout << " Loaded Status: " << boolalpha << T->loaded;
cout << " Destination: " << T->destination << " ";
}
 
        
             
        
        
        
Answer:
The features of any windows are
1. Start menu
2. Notification area or task bar
3. Window snipping tools
4. Using Local Area Networks
5. Windows explorer libraries
Explanation: