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
Arisa [49]
3 years ago
11

The code segmentif (speed <= 40)cout << "Too slow";if (speed > 40 && speed <= 55)cout << "Good spee

d";if (speed > 55)cout << "Too fast";could be written equivalently asif (speed <= 40)cout << "Too slow";else if (speed <= 55)cout << "Good speed";elsecout << "Too fast";A. TrueB. False
Computers and Technology
1 answer:
Black_prince [1.1K]3 years ago
3 0

Answer:

True is the correct answer for the above question.

Explanation:

  • The first code has three if statement, in which first if statement is true for the value of the speed which is less than or equal to 40 which can be false when the value of the speed can be greater than 40.
  • The if-statement clause also has a scenario where, if and else-if is used, in which the else-if statement will check when the if statement if being false.
  • So when the first if statement is false, then it is understood by the compiler that the value of the speed is greater than 40, which is no need to check in the else-if statement which is stated in the second code of the question.
  • Hence the first and the second code of the question gives the same result which is asked by the question. So the answer is true.
You might be interested in
A network technician has made a UTP cable that is terminated as T586A on one end and T586B on the opposite end. What type of cab
serious [3.7K]

Answer:

<h3>CROSSOVER CABLE </h3>

Explanation:

Crossover Cable is used to connect same types of device.

Crossover Cable is very similar to straight-through, except that they have pair of

wires that crisscross. This allows the two devices to communicate at the same

time.

TIA/EIA 568A: White/Green-Green, White/Orange-Blue, White/Blue-Orange,

White/Brown-Brown

TIA/EIA 568B: White/Orange-Orange, White/Green-Blue, White/Blue-Green,

White/Brown-Brown

6 0
3 years ago
What are the inputs and outputs of the app "Spotify"?
Anastasy [175]

Hey the I/O for Spotify would be. for I or input keyboard and mouse.

and for O or output the sound files being sent from the server to the pc

Hope this helps.

-Toby  aka scav

6 0
3 years ago
Why is it a good idea to view your HTML code in more than one web browser
Mandarinka [93]

Because some features may not be available on some browsers. By viewing it on different browsers, we can see if there's any incompatibilities and fix them.

5 0
4 years ago
Write a generator function named count_seq that doesn't take any parameters and generates a sequence that starts like this: 2, 1
Crank

Answer:

#code (count_seq.py)

def count_seq():

   n='2'

   while True:

       yield int(n)

       next_value=''

       while len(n)>0:

           first=n[0]

           count=0

     

           while len(n)>0 and n[0]==first:

               count+=1

               n=n[1:]

           next_value+='{}{}'.format(count,first)

       n=next_value

if __name__ == '__main__':

   gen=count_seq()

   for i in range(10):

       print(next(gen))

Explanation:

  • Start with number 2. Use string instead of integers for easy manipulation .
  • Loop indefinitely .
  • Yield the integer value of current n .
  • Loop until n is an empty string .
  • Loop as long as n is non empty and first digit of n is same as first .
  • Append count and first digit to next_value .
3 0
3 years ago
Short Answer:
alina1380 [7]
1) It's illegal because when you odometer on a vehicle you're tampering with the mileage to make it appear lower than what it actually is. 

2)Flashing your high beams is due to oncoming traffic or to alert the drivers. But it can mean different things. 

4) Locking your doors while drving is good idea because i feel like it's safer if you have kids and less likey to open in an a collision. 

5)Simply because, p<span>ower brakes are more powerful than standard breaks.

6) If you see your break light on, you should instantly check your break fluid and check your break pedal by pressing it hard to spot any indications of air or fluid. 

-Hope this help, couldnt answer three. </span>
8 0
4 years ago
Other questions:
  • Which statement about word processing software is true? A)You can use it to perform mathematical calculations.B) You can use it
    6·2 answers
  • What is the name of the formal procedure scientists use to study the world around them?
    14·2 answers
  • Is the ability to use digital tools for reading communicating and learning online?​
    5·1 answer
  • Which changes should be made to establish and maintain formal writing conventions? Select two options.
    10·1 answer
  • The concept of the internet was developed by the u.s. department of defense as a network that ________ in event of an attack.
    8·1 answer
  • Consider the following class, which models a bank account. The deposit method is intended to update the account balance by a giv
    8·1 answer
  • NEED HELP! BRAINLIEST FOR WHOEVER ANSWERS CORRECTLY FIRST!!!
    14·1 answer
  • How exactly do I answer questions?
    13·1 answer
  • Some elementary particles are positively or negatively
    11·2 answers
  • When creating a report,you can mske groups and subgroups by?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!