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
6

Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 19

70, print "Probably has head rests.". If after 1991, print "Probably has electronic stability control.". If after 2002, print "Probably has airbags.". End each phrase with period and newline. Ex: carYear = 1995 prints:
Engineering
1 answer:
Free_Kalibri [48]3 years ago
5 0

Answer:

The solution code is written in Python 3.

  1. carYear = 1995
  2. if(carYear < 1967):
  3.    print("Probably has few safety features.\n")
  4. if(carYear > 1970):
  5.    print("Probably has head rests. \n")
  6. if(carYear > 1991):
  7.    print("Probably has electronic stability control.\n")
  8. if(carYear > 2002):
  9.    print("Probably has airbags. \n")

Explanation:

Firstly, create a variable, <em>carYear</em> to hold the value of year of the car make. (Line 1)

Next, create multiple if statements as required by the question (Line 3-13). The operator "<" denotes "smaller" and therefore <em>carYear < 1967</em> means any year before 1967. On another hand, the operator ">" denotes "bigger" and therefore <em>carYear > 1970 </em>means any year after 1970.

The print statement in each of the if statements is done using the Python built-in function <em>print()</em>. The "\n" is an escape sequence that create a new line at the end of each printed phrase.

You might be interested in
14. The maximum amount a homeowner should spend on housing is
Simora [160]

Answer:

28%

Explanation:

Although there are sources that says 30% of gross income can be spent on housing, the most reliable amount that can be spent (according to other sources) is 28%.

Take for instance, you earn $5000 monthly, the maximum that you can spend on housing is:

Max = 28\% * \$5000

Using a calculator, we have:

Max = \$1400

<em>The maximum that can be spent on a monthly gross income of $5000 is $1400</em>

8 0
2 years ago
A series AC circuit contains a resistor, an inductor of 250 mH, a capacitor of 4.40 µF, and a source with ΔVmax = 240 V operatin
slega [8]

Answer:

Explanation:

Inductance = 250 mH = 250 / 1000 = 0.25 H

capacitance = 4.40 µF = 4.4 × 10⁻⁶ F ( µ = 10⁻⁶)

ΔVmax = 240, f frequency = 50Hz and I max = 110 mA = 110 /1000 = 0.11A

a) inductive reactance = 2πfl =  2 × 3.142 × 50 × 0.25 H =78.55 ohms

b) capacitive reactance = \frac{1}{2\pi fC} = 1 / ( 2 × 3.142× 50 × 4.4 × 10⁻⁶ ) = 723.34 ohms

c) impedance = \frac{Vmax}{Imax} = 240 / 0.11 = 2181.82 ohms

7 0
3 years ago
Read 2 more answers
Harlin is designing a new car engine that does not create pollution. Which technological design factor is probably the most
kari74 [83]

Answer: environmental impact

Explanation:

From the question, we are informed that Harlin is designing a new car engine that does not create pollution.

The technological design factor which is probably the most important for the design is the impact on the environment.

Pollution has a negative effect on the environment a d doing this shows that emphasis is placed on how the environmental issue of pollution can be tackled.

8 0
2 years ago
In this exercise, you will write a Point structure that represents a space in two-dimensional space. This Point should have both
Afina-wow [57]

Answer:

Check the explanation

Explanation:

Points to consider:

We need to take the input from the user

We need to find the manhatan distance and euclidian using the formula

(x1, y1) and (x2, y2) are the two points

Manhattan:

|x_1 - x_2| + |y_1 - y_2|

Euclidian Distance:

\sqrt{(x1 - yl)^2 + (x2 - y2)^2)}

Code

#include<stdio.h>

#include<math.h>

struct Point{

  int x, y;

};

int manhattan(Point A, Point B){

  return abs(A.x - B.x) + abs(A.y- B.y);

}

float euclidean(Point A, Point B){

  return sqrt(pow(A.x - B.x, 2) + pow(A.y - B.y, 2));

}

int main(){

  struct Point A, B;

  printf("Enter x and Y for first point: ");

  int x, y;

  scanf("%d%d", &x, &y);

  A.x = x;

  A.y = y;

  printf("Enter x and Y for second point: ");

  scanf("%d%d", &x, &y);

  B.x = x;

  B.y = y;

  printf("Manhattan Distance: %d\n", manhattan(A, B));

  printf("Euclidian Distance: %f\n", euclidean(A, B));

 

}

Sample output

8 0
3 years ago
Proper ventilation is required when welding, so that you don't ____________.
galben [10]
I say the answers is A but if you mean ventilation in the area of the room then answer B
4 0
3 years ago
Read 2 more answers
Other questions:
  • Explain the purpose of the checkpoint mechanism. How often should checkpoints be performed?How does the frequency of checkpoints
    6·1 answer
  • A steam pipe passes through a chemical plant, where wind passes in cross-flow over the outside of the pipe. The steam is saturat
    13·1 answer
  • Which section of business plan should be the bulk of the plan
    7·1 answer
  • A train which is traveling at 70 mi/hr applies its brakes as it reaches point A and slows down with a constant deceleration. Its
    12·1 answer
  • A force measuring instrument comes with a certificate of calibration that identifies two instrument errors and assigns each an u
    12·1 answer
  • Determine if the fluid is satisfied​
    10·1 answer
  • Limestone scrubbing is used to remove SO2 in a flue gas desulfurization (FGD) system. Relevant reactions are given below. A lime
    8·1 answer
  • 1)
    13·1 answer
  • a low velocity fastening system that is used to drive steel pins or threaded studs into a masonry and steel is a
    6·1 answer
  • It is possible to design a reactor where the scy conductor and the nitrogen/ammonia electrode operate at different temperatures.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!