Answer:
Idk the language of code but here is how it would be done in python
myAlarm():
arm = True
code = "secret message"
myAlarm()
main():
deactivate = input(">>> ")
if deactivate = myAlarm.code:
arm = False
Im still a little confused on the question.
(I am a game designer and I code daily)
Answer:
// here is code in Java.
// package
import java.util.*;
// class definition
class Main
{
// method that return sum of two sale value
public static int Add(int euroSales,int asiaSales)
{
// return the sum
return euroSales+asiaSales;
}
//main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// variables
int euroSales=100;
int asiaSales=150;
int eurasiaSales;
// call the function
eurasiaSales=Add(euroSales,asiaSales);
// print the sum
System.out.println("total sale is:"+eurasiaSales);
}catch(Exception ex){
return;}
}
}
Explanation:
Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.
Output:
total sale is:250
The power of science of course
Answer:
Following are the code in the Java Programming Language:
try{ //try block.
processor.process(); //
call the function through the object.
}
catch(Exception e){ //catch block .
System.out.println( "process failure"); //if any exception occurs then print.
}
Explanation:
In the following code, we set two blocks in Java Programming Language of the exception handling which is try block or catch block.
- In try block we call the function "process()" through the "processor" object.
- If any exception occurs in the program then the catch block print the following message is "process failure"
Answer: d) Exploit
Explanation: Exploit is a type computer attack that successful when the computer system of an user is vulnerable and attacker can do the exploitation. This happens due to the weakness of the system, applications software, network etc.
Other given option are incorrect because exit door,glitch and bad are not any type of attack in the computer field that causes harm to the system.Thus the correct option is option(d).