Answer: B) Web robot
Explanation:
Web robot or spider is the search engine program which automatically visit the new web site and update the information. Basically, it is the internet bot that helps in store the information from the search engine to the index.
Spider searches the web site and read the information in their given page for creating the entries from search engine.
Web robot is also known as web crawler, this type of programs are use by different search engine that automatically download and update the web content on web sites.
Answer:
The height of the ball after t seconds is h + vt - 16t 2 feet:
def main():
getInput()
def getInput():
h = int(input("Enter the initial height of the ball: ")) # Adding the int keyword before input() function
v = int(input("Enter the initial velocity of the ball: ")) # Same as above
isValid(h,v)
def isValid(h,v):
if ((h <= 0) or (v <= 0)):
print("Please enter positive values")
getInput()
else:
maxHeight(h,v)
def maxHeight(h,v):
t = (v/32)
maxH = (h + (v*h) - (16*t*t))
print ("\nMax Height of the Ball is: " + str(maxH) + " feet")
ballTime(h, v)
def ballTime(h,v):
t = 0
ballHeight = (h + (v*t) - (16*t*t))
while (ballHeight >= 0):
t += 0.1
ballHeight = (h + (v*t) - (16*t*t))
print ("\nThe ball will hit the ground approximately after " + str(t) + " seconds")
# Driver Code
main()
Answer:
I am writing a python code.
def getInput():
h = int(input("enter the height: "))
v = int(input("enter the velocity: "))
isValid(h,v)
def isValid(h,v):
if (h<= 0 or v<=0):
print("not positive ")
else:
height = maximumHeight(h,v)
print("maximum height of the ball is", height," ft.")
balltime = ground_time(h,v)
print("The ball will hit the ground after", balltime, "s approximately.")
def maximumHeight(h,v):
t = (v/32)
maxheight = (h + (v*t) - (16*t*t))
return maxheight
def ground_time(h,v):
t = 0.1
while(True):
heightofball = (h + (v*t) - (16*t*t))
if (heightofball <= 0):
break
else:
t += 0.1
return t
Explanation:
There are four functions in this program.
getInput() function is used to take input from the user which is height and velocity. h holds the value of height and v holds the value of velocity. input() function is used to accept values from the user.
isValid() function is called after the user enters the value of height and velocity. This function first checks if the value of height and velocity is less than 0. If it is true the message not positive is displayed. If its false then maximumHeight() is called which returns the maximum height of the ball and function ground_time() is called to return the time when the ball will hit the ground.
maximumHeight() function first divides the value of velocity with 32 as the ball will reach its maximum height after v/32 seconds. It then returns the maximum height by using the formula: heightofball = (h + (v*t) - (16*t*t)).
ground_time() calculates the time the ball takes to reach the ground. There is a while loop to height after every 0.1 second and determine when the height is no longer a positive. It uses (h + (v*t) - (16*t*t)) formula to calculate the height and when the value of height gets less than or equal to 0 the loop terminates otherwise it keeps calculating the height while adding 1 to the value of t at each iteration. After the loop breaks, it returns the value of t.
To see the output of the maximum height and time taken by ball to reach the ground, you can call the getInput() function at the end of the above program as:
getInput()
Output:
enter the height: 9
enter the velocity: 10
maximum height of the ball is 10.6525 ft.
the ball will hit the ground after 1.2 s approximately.
Answer:
public class ArithmeticMethods
{
public static void main(String[] args) {
int number1 = 7;
int number2 = 28;
displayNumberPlus10(number1);
displayNumberPlus10(number2);
displayNumberPlus100(number1);
displayNumberPlus100(number2);
displayNumberPlus1000(number1);
displayNumberPlus1000(number2);
}
public static void displayNumberPlus10(int number){
System.out.println(number + 10);
}
public static void displayNumberPlus100(int number){
System.out.println(number + 100);
}
public static void displayNumberPlus1000(int number){
System.out.println(number + 1000);
}
}
Explanation:
Inside the main:
Initialize two integers, number1 and number2
Call the methods with each integer
Create a method called displayNumberPlus10() that displays the sum of the given number and 10
Create a method called displayNumberPlus100() that displays the sum of the given number and 100
Create a method called displayNumberPlus1000() that displays the sum of the given number and 1000
Rest the left-hand’s fingers on A,S, D, and F keys.
Rest the right-hand’s fingers on A,S, D, and F keys.
Rest the right-hand’s fingers on Q,W, E, and R keys.
Answer:
Rest the right-hand’s fingers on Q,W, E, and R keys.is the correct answer
Explanation:
Input a String:
code
Input an integer:
3
eeedddoooccc
import java.util.*;
public class myClass {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
System.out.print("Input a String: ");
String str = scan.nextLine();
System.out.print("Input an integer: ");
int num = scan.nextInt();
for(int i=str.length()-1; i>=0; i--) {
for(int j=0; j<num; j++) {
System.out.print(str.charAt(i));
}
}
}
}
B. Quantitative risk assessment
C. Qualitative assessment of risk
D. Business impact scoring
E. Threat modeling
Answer:
The correct answer to the following question is option B). Quantitative risk assessment.
Explanation:
QRA ( Quantitative Risk assessment) is the objective risk assessment tool that is used to project threat impacts.
Quantitative Risk Assessment provides the estimate of magnitude of the consequences for each of the identified budget threats.
It set out to measure, define, provide, and predict the confidence level of the likelihood and the occurrence of the threat impacts.
Complete question is:
Assume there is a machine with the IP address 129.82.102.63 with netmask /23, and with a parent NW whose netmask is 255.255.224.0.
For each answer, do not include any spaces, give full IP addresses/netmasks where these are requested, give the "/" as part of the answer for slash notation.
a. What is the parent NW's netmask in dotted decimal notation?
b. What is the parent NW's netmask in slash notation?
c. What is the child NW's (subnet's) netmask in dotted decimal notation?
d. What is the child NW's (subnet's) netmask in slash notation?
e. How many bits are there for host # portion for the parent NW? (Another way to say the same thing is How many bits do we manage - on the parent NW?)
f. How many bits are there for NW# portion (within the parent address space) for the subnet?
g. How many bits are there for host # portion for the subnet?
h. How many addresses can we assign to machines/interfaces on this subnet?
Answer:
a. 255.255.224.0
b. /19
255.255 amounts to 16 bits being 1. .224 means 3 more bits are 1. So, in total 19 bits are 1. Hence, total network bits are 16 + 3 = 19.
c. 255.255.254.0
/23 means 8 + 8 + 7 that means
first 2 octets are 1s and 7 bits out of the 3rd octet are 1s. Hence, /23 means 255.255.254.0
d. /23
e. 13 bits are reserved for hosts
Parent network mask is /19, so total 32-19 = 13 bits
f. 19 bits are reserved for the network in the parent address.
g. 9 bits
Subnetwork's mask is /23, so total 32-23 = 9 bits for the host portion.
h. Since 9 bits are reserved for hosts, a total of 29 -2 = 510 machines can be assigned the IP addresses. Two addresses will be network and broadcast addresses for the subnet that can't be allocated to any device.
Explanation: