I wrote my code in python 3.8:
def max_magnitude(num1, num2):
return num1 if abs(num1) > abs(num2) else num2
print(max_magnitude(-8,-2))
I hope this helps!
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:
C
Explanation: This is because not every area is structured on the same ground as other places.
There are alot of parts in a computer system. You have to be a little specific