Answer:
binary digits in computer system it belongs
Answer:
Explanation:
Using Python programming language
Explanation:
1. I defined a function add and passed in two parameters (a,b).
2. In the block of the function, I added the two numbers and printed the result.
3. I decided to use a function so that the program is re-usable and can accept various inputs.
Find the code below. (# are used for comments)
#Addition of numbers
def add(a,b):
print(a+b)
#Test Cases
add(2,4.5) #Result=6.5
add(10,290) #Result=300
add(2.567,4.58) #Result=7.147
Answer:
Check the explanation
Explanation:
#include <iostream>
#include <iomanip>
using namespace std;
int getIQ(); // return the score
void printEvaluation(int);
int main()
{
int IQ = 0;
IQ = getIQ();
printEvaluation(IQ);
return 0;
}
int getIQ()
{
int score = 0;
cout << "Please enter your IQ Score to receive your IQ Rating:\n";
cin >> score;
return score;
}
void printEvaluation(int aScore)
{
cout << "IQ Score: " << aScore << " IQ Rating: ";
if (aScore <= 100)
{
cout << "Below Average\n";
}
else if (aScore <= 119)
{
cout <<"Average\n";
}
else if (aScore <= 160)
{
cout << "Superior\n";
}
else if (aScore >= 160 )
{
cout << "Genius\n";
}
}