In python:
year = int(input("Enter the school year: "))
if 0 <= year <= 5:
print("Elementary school")
elif 6 <= year <= 8:
print("Middle school")
elif 9 <= year <= 12:
print("High School")
elif 13 <= year <= 16:
print("College")
elif year >= 17:
print("Post-secondary")
else:
print("Invalid")
I hope this helps!
Answer:
The correct answer is 1000 MIPS.
Explanation:
Using the rule of three you can solve the needed cycles to complete 1.000.000 instructions.
1.000.000 instructions multiplied by 2 cycles, divided by 1 instruction is equal to 2.000.000 cycles to complete 1.000.000 instructions.
To find the MIPS you have to divide the frequency by the cycles needed to complete 1.000.000 instructions.
MIPS = 2GHZ / 2.000.000 cycles = 1000 MIPS.
b. It allows an administrator to analyze a computer and compare its configuration settings with a baseline.
c. It can apply a baseline to force current computer settings to match the settings defined in the baseline.
d. It uses security templates to store the settings that make up baselines.
Answer: a. It evaluates the current security state of computers in accordance with Microsoft security recommendations
Explanation:
The Security Configuration and Analysis tool allows the configuration of local computers through the application of the settings in a security template to the local policy.
This allows an administrator to analyze a computer and compare its configuration settings with a baseline. The Security Configuration and Analysis (SCA) tool also uses security templates to store the settings that make up baselines.
Therefore, based on the options given, the correct option is A as the SCA tool doesn't evaluate the current security state of computers in accordance with Microsoft security recommendations.
Answer:
// Application in java.
// package
import java.util.*;
// class definition
class Main
{
// method for calculating interest
public static float calculateInterest(float start_bal,float i_Rate)
{
// calculate return
float return_Amount=start_bal+(start_bal*(i_Rate/100));
// return
return return_Amount;
}
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// scanner Object to read the input
Scanner sc = new Scanner(System.in);
// variables
float start_bal;
float i_Rate=5;
// ask to enter start money
System.out.print("Enter start money:");
// read start money
start_bal=sc.nextFloat();
// call the function and print the return amount
System.out.println("5% interest earned on $" + start_bal + " after one year is $" + calculateInterest(start_bal,i_Rate));
}catch(Exception ex){
return;}
}
}
Explanation:
Declare and initialize interest rate with 5.Then read the start money from user.Then call the method calculateInterest() with parameter start_bal and i_Rate.It will calculate the return amount after 1 year.Print the returned amount in main method.
Output:
Enter start money:1500
5% interest earned on $1500.0 after one year is $1575.0
Picture:
1. Motherboard
2. Power Supply
3. CPU (Central Processing Unit)
4. Random Access Memory (RAM)
5. Hard Disk Drive/Solid State Drive
6. Video Card
7. Optical Drives
8. Input and Output Devices
Answer:
I think 2.power supply yaar
Answer: syntax is a set of rules for grammar and spelling. In other words, it means using character structures that a computer can interpret
Answer:
in computer science, the syntax of a computer language is the set of rules that defines the combinations of symbols that are considered to be correctly structured statements or expressions on that language.
C++ program for calculating the average of scores
#include <iostream>
using namespace std;
const int n=5;//As per question only 5 test scores were there
int numbers[5];
void getscore(int i)//defining function for taking input
{
cin >> numbers[i];
while(numbers[i]<0 || numbers[i]>100)//score should be between 0 to 100
{
cout<<"\nThe number should be between 0 to 100\n";
cin>>numbers[i];
}
}
int main()//driver function
{
cout << "Enter 5 scores:\n";
for (int i = 0; i < n; i++)
{
getscore (i);//calling function each time for input
}
int s = 101;
double avg = 0;
for (int i = 0; i < n; i++)//loop for finding the smallest
{
s = numbers[i] < s ? numbers[i] : s;
}
for (int i = 0; i < n; i++) //loop for finding the Average
{
avg += numbers[i];
}
avg -= s;
avg /= 4;
cout << "Average of the four scores are: " << avg<< endl;//printing the output
return 0;
}
Output
Enter 5 scores:
4
5
6
7
8
Average of the four scores are: 6.5