Answer:
Explanation:
The following code is written in Java and it asks you for your age and then prints out the exact date from your birthday that you will turn 10,000 days old.
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("What is your age?");
int age = in.nextInt();
int daysLeft = (10000 - (age*365));
Date birthday = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(birthday);
cal.add(Calendar.DATE, daysLeft);
Date modifiedDate = cal.getTime();
System.out.println(modifiedDate);
}
}
Answer:
Assuming this is in python:
def check_password(password):
correct_password = "qbasic"
if password == correct_password:
return True
else:
return False
def main():
user_input = input("Type in your password: ")
if check_password(user_input):
print("Correct!")
else:
print("Wrong, try again")
main()
Explanation:
Hope this helped :) If it wasn't suppose to be in python, tell me so I can make it in the correct programming language.
Have a good day :)
Answer:
In Python:
low = int(input("Low: "))
high = int(input("High: "))
if low >= 1000000000 or high >=1000000000:
print("Out of range")
else:
mylist = []
for num in range(low,high+1):
flag = False
if num > 1:
for i in range(2, num):
if (num % i) == 0:
flag = True
break
if not flag:
mylist.append(num)
print(num, end = " ")
print()
print("The twin primes are: ",end="")
count = 0
for i in range(1,len(mylist)):
if mylist[i] - mylist[i-1] == 2:
print(str(mylist[i])+" & "+str(mylist[i-1]),end=", ")
count+=1
print()
print("There are "+str(count)+" twin primes")
Explanation:
See attachment for complete program where comments were used to explain each line
Answer:
Correct option is B: Train the employees on why these issues are security concerns
Explanation:
When employees do not follow corporate guidelines regarding information systems and security, it is the duty of organizations to ensure that every employee knows the importance of following these guidelines due to the security risk the company might face. Hence, it is Henry's duty to ensure that he trains the employees on why their not following guidelines and looking at their personal emails are security concerns. This way he is sure that the employees are aware of the risks and any further breach in policy from them would require consequences.