Answer:
- import datetime
-
- def get_year_of_birth():
- age = int(input("Enter your age: "))
- current_year = datetime.datetime.now().year
- year_of_birth = current_year - age
- return year_of_birth
-
- print(get_year_of_birth())
Explanation:
Firstly, we import datetime module as we need it to get the current year (Line 1).
Next, create a function named it as get_year_of_birth (Line 3). Prompt user to input age and assign it to a variable (Line 4). Next, we use now() method from datetime module to get the current date and time and extract the year component (Line 5). At last, calculate the year of birth by subtracting the current_year with age and return it as output (Line 6-7).
Answer:
Disruptive Technologies.
Explanation:
Smart Phones and the social media are very power tools they can be used to spread a news like a fire very rapidly.
People mostly believe the new that come on their smartphones and the social media.
So the employees of the company can also be influenced by these technologies hence they can disrupt the work of the company and can make or break the company.
Nope its located at your my computer
Answer:
The answer to this question is option "B".
Explanation:
In the given question options B and C are correct because class B uses a network, subnet, and host bits that must be equal to the sum of 32 bits. In both options the total bits are equal to 32 bits, a class needs 7 subnet bits at any rate for supports 100 subnets. and other options are not correct that can be defined as:
- In option, a network, subnet and host bits are not equal to 32 bit because class needs 32 bits. that's why it is wrong.
- In option, d network bits are 8 it is incorrect because query tells a Class B is a network that uses the number of network bits is equal to 16 bits.
Answer:
import java.util.Scanner;
public class num8 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter first number");
int X = in.nextInt();
System.out.println("Enter second number");
int Y = in.nextInt();
int Z;
if(X <= Y){
Z = 0;
}
else if(X >= Y){
Z = 1;
}
}
}
Explanation:
- The program is implemented in Java
- In order to set the values for X and Y, The Scanner class is used to receive and store the values in the variables (Although the questions says you should assume these values are set)
- The if conditional statement is used to assign values (either 0 or 1) to variable Z as required by the question.