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
levacccp [35]
3 years ago
15

Write multiple if statements. if car_year is 1969 or earlier, print "few safety features.". if 1970 or later, print "probably ha

s seat belts.". if 1990 or later, print "probably has anti-lock brakes.". if 2000 or later, print "probably has air bags." end each phrase with a period and a newline. ex: car_year = 1995 prints:

Computers and Technology
2 answers:
tamaranim1 [39]3 years ago
5 0
Here it is in Python. If you wanted a different language, you should specify that in your question.

if car_year < 1970:
    print('few safety features.')
else:
    print('probably has seat belts.')
    if car_year > 1989:
        print('probably has anti-lock brakes.')
    if car_year > 1999:
        print('probably has air bags.')

The else statement may seen unnecessary, but it prevents the program from having to perform those conditional checks, when they are 100% going to be false if the car year is 1969 or earlier. You are welcome to remove this if you like.
Doss [256]3 years ago
4 0

Answer: if (carYear < 1967) {

        System.out.println("Probably has few safety features.");

     }

     if ( carYear > 1970 ){

        System.out.println("Probably has seat belts.");

     }

     if (carYear > 1991) {

        System.out.println("Probably has anti-lock brakes.");

     }

     if ( carYear > 2000) {

        System.out.println("Probably has airbags.");

     }

Explanation:

Just changed the statement in the print line but the rest of the code is the same

You might be interested in
Problems and Exercises 16 through 43 are based on the entire ("big" version) Pine Valley Furniture Company database. Note: Depen
lesya [120]

Answer:

SQL queries

The command used to display the customer ID and total number of orders placed is given below

Query:

SELECT CustomerID, COUNT (orderID) AS TotalOrders

FROM Order_Table

GROUP BY CustomerID

Explanation:

SQL queries

The command used to display the customer ID and total number of orders placed is given below

Query:

SELECT CustomerID, COUNT (orderID) AS TotalOrders

FROM Order_Table

GROUP BY CustomerID

SELECT - To query the database and get back the specified fields SQL uses the select statement

CustomerID is a coloumn name

The function COUNT(OrderID) returns the number of orders

Totalorderds is a label

FROM - To query the database and get back the preferred information by specifying the table name

Order_Table is a table name

GROUP BY - The clause is used to group the result of a SELECT statement done on a table where the tuple values are similar for more than one column

The table below displays the CustomerID and total number of orders placed

CustomerID                                              Totalorders

4                                                                    28

1                                                                      6

12                                                                    5

16                                                                    5

6                                                                     3

9                                                                     3

15                                                                    3

3                                                                     1

13                                                                    1

14                                                                    1

The table below shows the total number of orders situated for each sales person

SalesPerson_ID                                         TotalOrders

3                                                                    16

2                                                                     3

4                                                                     3

5                                                                     3

3 0
3 years ago
Why ads on this app do it help pay for the free stuff?
UNO [17]

Answer:

Yes

Explanation:

The ads help support the system for you using this website for free.

4 0
2 years ago
When trying to work efficiently, how should you prioritize your tasks? (Site 1)
Mashcka [7]
<span>It's important that you develop effective strategies for managing your time to balance the conflicting demands of time for study, leisure, earning money and jobhunting. Time management skills are valuable in jobhunting, but also in many other aspects of life: from revising for examinations to working in a vacation job.</span>
8 0
3 years ago
An inserted graphic in Excel is
telo118 [61]
<h2>Answer:</h2>

<u>An inserted graphic in Excel is </u><u>B. inserted in the active cell.</u>

<h2>Explanation:</h2>

A graphic is considered as any picture or shape present in the directory of any computer. So when you are working in an Excel worksheet and you insert any graphic so it means you have inserted a shape. It may be a line, picture or any other geometrical shape, then this image or graphic will be inserted in the cell which is active at that time and no where else. Therefore option B is the correct answer.

7 0
4 years ago
Read 2 more answers
What does the following code print?double[] myList = {1, 5, 5, 5, 5, 1};double max = myList[0];int indexOfMax = 0;for (int i = 1
Liula [17]

Answer:

This code will print: 4

Explanation:

Following is the step-by-step explanation for the given code:

  • Given is the array of data type double named myList, it has entries, 1, 5, 5, 5,5, 1:

                    double[] myList = {1, 5, 5, 5, 5, 1};

  • Now the first element of the array (1) with index 0 will be stored in the variable max (data type double).

                 double max = myList[0];  

  • A variable indexOfMax having datatype int will be initiated as 0.

                 int indexOfMax = 0;

  • Now for loop will be used to find the maximum number of the array. The variable i will be put as index for each element to compare with first element. If the checked element is greater than or equal to the integer in max, it will be replaced. So at the end the variable max will have value 5 that will be at index i = 4.

                    for (int i = 1; i < myList.length; i++)

                            { if (myList[i] >= max)

                               { max = myList[i];

  • Now the variable i that is the index for max value will be stored in the variable indexOfMax (indexOfMax = 4).

                  indexOfMax = i; }}

  • At end the value stored in variable indexOfMax will be printed, so 4 will be printed as output.

              System.out.println(indexOfMax);

i hope it will help you!

7 0
3 years ago
Other questions:
  • When you don't have enough room to stop, you may _______ to avoid what's in front of you. A. speed up B. steer away C. brake
    7·2 answers
  • how do i create an advanced search using the search criteria in the range K2:S3 and the inventory data where the results will be
    8·1 answer
  • Documenting Business Requirements helps developers control the scope of the system and prevents users from claiming that the new
    13·1 answer
  • What is employee Internet management (EIM) software?
    5·2 answers
  • Please help ASAP, will mark brainliest!
    7·1 answer
  • Anyone follows abhay​
    10·1 answer
  • Character positions in<br> arrays start counting with<br> the number 1.<br> True<br> False
    14·1 answer
  • When attaching a file or files in outlook 365 you select the attach command and then select the files location
    5·1 answer
  • What steps should you take if your harassed online​
    9·2 answers
  • Assume the user responds with a 3 for the first number and a 5 for the second number.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!