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
frozen [14]
3 years ago
14

A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en

tire expression is:_____.A. True B. false
Computers and Technology
1 answer:
jolli1 [7]3 years ago
6 0

Answer:

The correct answer is True.

Explanation:

Short circuit evaluation is the semantics of some Boolean operators in some programming languages in which the second argument is executed or only evaluated if the first argument is not sufficient to determine the value of the expression: when the first argument of the AND function evaluate to false, the global value must be false; and when the first argument of the OR function evaluates to true, the global value must be true. In some programming languages (Lisp, Perl, Haskell, due to lazy evaluation), the usual Boolean operators are short-circuited. In others (Ada, Java), both short-circuit and standard Boolean operators are available. For some Boolean operations, such as exclusive or (XOR), a short circuit is not possible, because both operands are always necessary to determine the result.

You might be interested in
Assuming that the message variable contains the string "Happy holidays", the statement message.find("days"); returns a. -1b. 10c
katrin [286]

Answer:

Answer is b. 10                

Explanation:

The find() method is used to search the string for a specified value and searches the first occurrence of that value. It returns the position of that specified value. If the value is not found, this method returns -1.

Lets say we have a message variable that contains the string Happy holidays.

message = "Happy holidays"

We use the method find() to find days word from the Happy holidays string in the message variable.

The find() method will find the position of day.

If we look at the string Happy holidays we see that the word day is at the 10th position of the string.

H     1

a      2

p      3

p      4

y      5

h      6

o      7

l       8

i       9

d      10

a      11

y      12

s      13

So it is at 10th position so the statement

message.find("days")

returns 10

7 0
3 years ago
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
sdas [7]

Answer:

The modified program in Python is as follows:

import math

paint_colors = {'red': 35,'blue': 25,'green': 23}

wall_height = int(input('Enter wall height (feet):\n'))

wall_width = int(input('Enter wall width (feet):\n'))

area = wall_height*wall_width

print('Wall area:',area,'square feet')

paint_needed = area/350.0

print('Paint needed: {:.2f} gallons'.format(paint_needed))

print('Cans needed:',round(paint_needed),'can(s)')

color = input("Choose a color to paint the wall: ")

print("Cost of purchasing", color, "paint: $",paint_colors[color])

Explanation:

The italicized are given from the question [unchanged]

<em>import math</em>

<em> paint_colors = {'red': 35,'blue': 25,'green': 23} </em>

<em>wall_height = int(input('Enter wall height (feet):\n')) </em>

This gets input for width

wall_width = int(input('Enter wall width (feet):\n'))

Calculate the wall area

area = wall_height*wall_width

Print the calculated wall area

print('Wall area:',area,'square feet')

Calculate the amount of paint needed

paint_needed = area/350.0

Print the amount of paint needed to 2 decimal places

print('Paint needed: {:.2f} gallons'.format(paint_needed))

Print the amount of can needed to nearest integer

print('Cans needed:',round(paint_needed),'can(s)')

Prompt user for color of paint [here, we assume the user input is correct]

color = input("Choose a color to paint the wall: ")

Prints the corresponding amount for the color

print("Cost of purchasing", color, "paint: $",paint_colors[color])

3 0
2 years ago
Do you need a contractor to install nest thermostat
Natalka [10]

Answer:

Sometimes yes, sometimes you can do it yourself

Explanation:

Installing a Nest thermostat can be done yourself without an electrician in most cases. Nest thermostats are designed to work in homes without a common (“C”) wire. However, there are rare cases a C wire or other power-supply accessory may be required. An electrician is recommended in these rare cases.

5 0
3 years ago
Can I have some help?
Ad libitum [116K]
I believe its A as the image provided says plain message
6 0
2 years ago
When you _____ a workbook, you control the ability users have to make changes to the file?
ehidna [41]
<span>When you protect a workbook, you control the ability users have, to make changes to the file.  This is t</span><span>o prevent other users from making changes, functions like adding, moving, deleting, or hiding worksheets, and renaming worksheets, you can </span>protect<span> it </span><span>with a password. </span>
5 0
3 years ago
Other questions:
  • An email address is made up of all of the following parts except
    13·2 answers
  • Readability is the level of vocabulary used on the page. True or false
    8·1 answer
  • Which of the following is an open-source web browser?
    8·2 answers
  • why is there a need of properly interpreting teacher's/manufacturer's specifications before operating any food processing equipm
    9·1 answer
  • What should you include in a persuasive speech
    14·1 answer
  • Site at least 3 articles of impact of internet that affect in our daily lives.
    15·1 answer
  • The Operating System is used to locate, move, and copy files.
    10·1 answer
  • Williams Bros. Appliances
    12·1 answer
  • Java can be procedural or object-oriented when it comes to programming. What is the difference between procedural and OOP?​
    13·1 answer
  • The second generation of computer languages is a higher-level language than
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!