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
An engineer measures a sample of 1200 shafts out of a certain shipment. He finds the shafts have an average diameter of 2.45 inc
Vadim26 [7]

Answer: 78.89%

Explanation:

Given : Sample size : n=  1200

Sample mean : \overline{x}=2.45

Standard deviation : \sigma=0.07

We assume that it follows Gaussian distribution (Normal distribution).

Let x be a random variable that represents the shaft diameter.

Using formula, z=\dfrac{x-\mu}{\sigma}, the z-value corresponds to 2.39 will be :-

z=\dfrac{2.39-2.45}{0.07}\approx-0.86

z-value corresponds to 2.60 will be :-

z=\dfrac{2.60-2.45}{0.07}\approx2.14

Using the standard normal table for z, we have

P-value = P(-0.86

=P(z

Hence, the percentage of the diameter of the total shipment of shafts will fall between 2.39 inch and 2.60 inch = 78.89%

7 0
3 years ago
Infinitivo de vivia kkk xd
blagie [28]

Answer:

pls put a question not random letters

Explanation:

8 0
3 years ago
How much horse power does a Lamborghini have
statuscvo [17]
The Lamborghini SCV12 has 830 horse power.
4 0
2 years ago
Read 2 more answers
Discuss the difference between the observed and calculated values. Is this error? If yes, what is the source?
Scrat [10]

Answer and Explanation:

In any experiment, the observed values are the actual values obtained in any experiment.

The calculated values are the values that are measured by using the observed values in a formula.

The observed values are primary values whereas the calculated values are the secondary values as calaculations are made using observed values.

Yes, if the observed values are of low accuracy.

The values should be recorded with proper care and attention in order to avoid any error.

8 0
3 years ago
Why do engineers play a variety of roles in the engineering process?
katrin2010 [14]

Answer:

b

Explanation:

7 0
2 years ago
Other questions:
  • Are engineers needed in today’s society ? Why or why not ? I need a short three paragraph essay !!! Please help me !!!
    13·1 answer
  • Assuming the torsional yield strength of a compression spring is 0.43Sut and the maximum shear stress is equal to 434MPa. What i
    9·1 answer
  • Argon is compressed in a polytropic process with n = 1.2 from 100 kPa and 30°C to 1200 kPa in a piston–cylinder device. Determin
    14·1 answer
  • Please write the command(s) you should use to achieve the following tasks in GDB. 1. Show the value of variable "test" in hex fo
    5·1 answer
  • Determine the time required for a car to travel 1 km along a road if the car starts from rest, reaches a maximum speed at some i
    10·1 answer
  • What is the definition of insert view and why do we use it
    10·1 answer
  • Blank is a measure of the amount of matter in a given amount of space
    8·1 answer
  • How many meters per second is 100 meters and 10 seconds
    12·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    7·1 answer
  • What is shown in the above figure
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!