1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nikolay [14]
3 years ago
15

An if statement must always begin with the word “if.” True False python

Computers and Technology
2 answers:
MrMuchimi3 years ago
6 0

Answer:

true

Explanation:

jolli1 [7]3 years ago
6 0

Answer:

True

Explanation:

I took a test on what you are learning.

You might be interested in
Assume x represents an integer number, what is the highest index value in the following array? byte[] values = new byte[x]; Grou
scoundrel [369]

Answer:

You forgot to add a group of choices, however assuming this programming language uses 0-based indexes the answer would be x - 1

Explanation:

Zero based index languages have array indexes starting at 0. When you create that array, you use x to define the amount of elements, however due to the array starting at the index 0, the arrays highest index would be x - 1 instead of x.

4 0
2 years ago
The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 with a gasoline purchase of $
Xelga [282]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

              //print the header

              System.out.println("**************************************");

              System.out.println("*                                    *");

              System.out.println("*                                    *");

              System.out.println("*   Gas-N-Clean Service Station      *");

              System.out.println("*                                    *");

              System.out.println("*   March 2, 2004                    *");

              System.out.println("*                                    *");

              System.out.println("**************************************");

 

               //set the constant values for gasoline

               final double REGULAR_GASOLINE = 2.89;

               final double PLUS_GASOLINE = 3.09;

               final double SUPER_GASOLINE = 3.39;

 

              // initialize the variables as 0

              double gasolinePrice = 0, gasolineCost = 0, carWashCost = 0, totalCost = 0;

 

               Scanner input = new Scanner(System.in);

 

               //ask the user to enter the gallons, gas type and car wash choice

               System.out.print("Enter number of gallons ");

               double gasolinePurchase = input.nextDouble();

               System.out.print("Enter gas type (R, P, S, or N) ");

               char gasType = input.next().charAt(0);

               System.out.print("Enter Y or N for car wash ");

               char carWashChoice = input.next().charAt(0);

               //check the gas type. Depending on the choice set the gasolinePrice from the corresponding constant value

              if(gasType == 'R')

                  gasolinePrice = REGULAR_GASOLINE;

              else if(gasType == 'P')

                  gasolinePrice = PLUS_GASOLINE;

              else if(gasType == 'S')

                  gasolinePrice = SUPER_GASOLINE;

 

                //calculate the gasolineCost

                gasolineCost = gasolinePurchase * gasolinePrice;

 

               //check the carWashChoice. If it is yes and gasolineCost is greater than 10, set the carWashCost as 1.25. Otherwise, set the carWashCost as 3.00

               if(carWashChoice == 'Y'){    

                   if(gasolineCost >= 10)

                       carWashCost = 1.25;

                   else

                       carWashCost = 3.00;

               }

              //calculate the total cost, add gasolineCost and carWashCost

              totalCost = gasolineCost + carWashCost;

 

               //print the values in required format

              System.out.println("Amount Gasoline purchases " + gasolinePurchase);

              System.out.println("Gallons Price per gallons $ " + gasolinePrice);

              System.out.printf("Total gasoline cost $ %.2f\n", gasolineCost);

              System.out.println("Car wash cost $ " + carWashCost);

              System.out.printf("Total due $ %.2f\n", totalCost);

               System.out.println("Thank you for stopping\nPlease come again \nRemember to buckle up and drive safely");

}  

}

Explanation:

*The code is in Java.

Please see the comments in the code for explanation

4 0
3 years ago
Which computer device works like the human central nervous system by connecting all the computer’s parts together and allowing t
ladessa [460]
The computer device that works like the human central nervous system is the motherboard. The motherboard is the main PCB (Printed Circuit Board) that exists inside most PC's, and in certain other systems. The function of the motherboard is to contain most of the essential components to a functioning system. This includes the CPU (Central Processing Unit) and storage of memory.
7 0
3 years ago
Read 2 more answers
Has the worst state of seat belt usage in the nation
german
Hope this helps pls thank me

7 0
4 years ago
Please help! I'll give you a medal!
SCORPION-xisa [38]
<span>A cyber community is a group of people that are visiting the same site and interacting with one another through it. If you are interacting with people on a website, you are part of a cyber community. If a friend wants you to watch a video at home, that is probably okay. If the content of that video bothers you though, you should say no or turn it off. If it's really bad, you may even need to tell someone. If your neighbor wants to be your friend online, that might be okay. I think you should probably let your parents know first and they can help you make a decision on that. If a stranger wants to be your friend, you need to say no and maybe even let an adult know.</span>
5 0
4 years ago
Other questions:
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    11·2 answers
  • Describe the six clauses in the syntax of an SQL retrieval query. Show what type of constructs can be specified in each of the s
    14·1 answer
  • Crystal detected a problem in a computer network, due to which she could not send or receive data within the network. She pings
    5·2 answers
  • Create a loop that will output all the multiples of 5 that are greater than zero and less than 60 (do not include 60). 5, 10, 15
    10·1 answer
  • Meaning of page break​
    8·1 answer
  • You need to provide connectivity between two buildings without running any cables. You decided to use two 802.11ac APs to provid
    14·1 answer
  • Which of the following describes the phishing method of information security crime?
    14·2 answers
  • What is different between a pc mouse and a real mouse
    12·2 answers
  • federal law requires public libraries to install filtering software on computers to prevent children from accessing adult conten
    14·1 answer
  • When conducting memory and recall tests, some people make an effort to normalize memories by not reporting extreme cases. this l
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!