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:
Explanation:
El siguiente codigo esta escrito en Java. Le pide al usario que marque la edad. Despues el programa analiza la edad y imprime a la pantalla si el usario es mayor de edad o menor de edad. El programa fue probado y el output se puede ver en la imagen abajo.
import java.util.Scanner;
class Brainly
{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Cual es tu edad?");
int age = in.nextInt();
if (age > 18) {
System.out.println("Mayor de Edad");
} else {
System.out.println("Menor de Edad");
}
}
}
Literally just do a colon and parenthesis :(
:( :-(
The answer is The Internet. It is a vast global network that is made up of many smaller interconnected networks. It connects to millions of computer units world wide, in which any computer can communicate with any other computer as long as they are both connected to the Internet. It also made access to information and communication easier.
Answer:
sharing data across multiple workstations on the same network
Explanation:
A Network Attached Storage device is good for sharing data across multiple workstations on the same network.