When a site is unsafe, it means that the personal information may be used in ways that is not proper.
Answer:
Explanation:
This would be considered a setter method. In most languages the parameter of the setter method is the same as the variable that we are passing the value to. Therefore, within the function you need to call the instance variable and make it equal to the parameter being passed. It seems that from the function name this is being written in python. Therefore, the following python code will show you an example of the Employee class and the set_age() method.
class Employee:
age = 0
def __init__(self):
pass
def set_age(self, age):
self.age = age
As you can see in the above code the instance age variable is targeted using the self keyword in Python and is passed the parameter age to the instance variable.
Answer:
import java.util.Scanner;
public class num7 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the grade 60-100");
double grade = in.nextDouble();
while(grade<60 ||grade>100){
System.out.println("Enter a valid grade 60-100");
grade= in.nextDouble();
}
double outVal;
if(grade>=60 && grade<70){
outVal = 0.0;
}
else if(grade>=70 && grade<80){
outVal = 1.0;
}
else if(grade>=80 && grade<90){
outVal = 2.0;
}
else if(grade>=90 && grade<100){
outVal = 3.0;
}
else{
outVal = 4.0;
}
System.out.println("The converted grade is: "+outVal);
}
}
Explanation:
- The program is written in Java
- User is prompted to enter a grade between 60-100
- A while loop is used to validate user input
- If/else if/else statements are used to convert the values as required
- the output value is stored as a double
Answer:
finding and extracting hidden predictive information from the data in large databases.
The answer is 255(base 10). Correct me if I’m wrong!