The correct response is "dark matter and dark energy and dust." Explanation: In the vast emptiness of the universe, it’s filled with gases and residuals. While humans may perceive the empty space as devoid of contents, it includes plasma hydrogen and helium gases, in addition to various types of dirt and remnants. There's a variety of other materials, but greenhouse gases and dust comprise the majority.
Here’s a Python program containing a function named sum_scores:
def sum_scores(score1, score2, score3, score4):
total = score1 + score2 + score3 + score4
print(total)
sum_scores(14, 7, 3, 0). This outputs the cumulative score of 24. If preferred, rather than printing the result, a return statement could be used to provide the sum.
The do-while loop for this task is presented below.
do
{
// request the user to input two numbers
cout<<"Please input two numbers to add."<<endl;
cin>>num1;
cin>>num2;
sum = num1 + num2;
// display the sum
cout<<"The sum of the two numbers is "<<sum<<endl;
// ask the user if they want to continue
cout<<"Would you like to keep going (y/n)?"<<endl;
cin>>choice;
}while(choice!= 'n');
The variables for the two numbers and their sum are defined as float for compatibility with both integers and decimals.
float num1, num2, sum;
The choice variable is char since it only needs to hold a single character input from the user, either 'y' or 'n'.
char choice;
The complete program is structured as follows:
#include <iostream>
using namespace std;
int main() {
float num1, num2, sum;
char choice;
do
{
// request the user to input two numbers
cout<<"Please input two numbers to add."<<endl;
cin>>num1;
cin>>num2;
sum = num1 + num2;
// display the result
cout<<"The sum of the two numbers is "<<sum<<endl;
// query the user on continuing
cout<<"Would you like to keep going (y/n)?"<<endl;
cin>>choice;
}while(choice!= 'n');
cout<<"Exiting..."<<endl;
}