It's B.
As you go up, the air thins out, meaning it is less dense. Since there are less molecules that can transfer heat, the temperature is lower.
Its either D or A but im pretty sure its D??
Answer:
- import java.util.Scanner;
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner input = new Scanner(System.in);
- System.out.print("Please enter two characters: ");
- String inputStr = input.nextLine();
-
- if(inputStr.charAt(0) == 'B' || inputStr.charAt(0) == 'b'){
- System.out.println("Biology");
- }
- else if(inputStr.charAt(0) == 'C' || inputStr.charAt(0)== 'c'){
- System.out.println("Computer Science");
- }
- else if(inputStr.charAt(0) == 'I' || inputStr.charAt(0) == 'i')
- {
- System.out.println("Information Technology and Systems");
- }
- else{
- System.out.println("Invalid major");
- }
-
- int num = Character.getNumericValue(inputStr.charAt(1));
-
- if(num >= 1 && num <= 4){
- switch (num){
- case 1:
- System.out.println("freshman");
- break;
- case 2:
- System.out.println("sophomore");
- break;
- case 3:
- System.out.println("junior");
- break;
- case 4:
- System.out.println("senior");
- break;
- }
-
- }
- else{
- System.out.println("Invalid year status");
- }
-
- }
-
- }
Explanation:
The code consists of two main parts. The part 1 is to validate the input major and print out the major according to the input character (Line 10 -22). If the input character is not matched with the target letters, a message invalid major will be displayed.
The part 2 is to validate the year status to make sure it only fall within the range of 1-4 (Line 26 -45). If within the range, the program will display the year major accordingly. If not a message invalid year status will be displayed.
Answer: 443
Explanation:
Port 443 will need to be enabled for secure transactions to go through because it is the default port for HTTPS which is the transfer protocol for secure communication.
This way your credit card transactions will be encrypted to ensure protection from those who would seek to steal your data and your money.
Answer:
customers = int(input("How many customers? "))
for i in range(customers):
name = input("Name of Customer " + str(i+1) + " ")
print("Oranges are $1.40 each.")
oranges = int(input("How many Oranges? "))
print("Apples are $.75 each.")
apples = int(input("How many Apples? "))
bill = oranges * 1.4 + apples * 0.75
print(name + ", you bought " + str(oranges) + " Orange(s) and " + str(apples) + " Apple(s). Your bill is $%.1f" % bill)
Explanation:
*The code is in Python.
Ask the user to enter the number of customers
Create a for loop that iterates for each customer. Inside the loop, ask the user to enter the name, number of oranges, number of apples. Calculate the bill. Print the name, number of oranges, number of apples bought and total bill