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
joja [24]
3 years ago
15

Write code that sets the value of a variable named delicious to True if jellybeans is greater than 20, or licorice is greater th

an 30, or their sum is greater than 40. Otherwise, set it to False. Do NOT use an if statement in your solution. Assume jellybeans and licorice already have values.
Computers and Technology
1 answer:
Sati [7]3 years ago
3 0

Answer:

jellybeans = 10

licorice = 35

delicious = (jellybeans > 20) or (licorice > 30) or ((jellybeans + licorice) > 40)

print(delicious)

Explanation:

*The code is in Python.

Set the jellybeans and licorice to any values you like

In order to have the value of True or False without using the if statement, we need to set delicious as boolean variable. As you may know, boolean variables are the variables that have a value of either True or False

Check if jellybeans is greater than 20 or not → (jellybeans > 20)

Check if licorice is greater than 30 or not → (licorice > 30)

Check if their sum is greater than 40 or not → ((jellybeans + licorice) > 40)

All of the above expressions are boolean expressions. They return True if the statement is correct. Otherwise, they return False

Also, note that we combined all the expressions with or

For these values → jellybeans = 10, licorice = 35:

The first statement returns False

The second statement returns True

The third statement returns True

delicious = False or True or True → True

Note that if the expressions are combined with or, the result will be True if one of the expression is True.

You might be interested in
Suppose that you have been asked to create an information system for a manufacturing plant that produces nuts and bolts of many
maksim [4K]

Answer:

Following are the solution to this question:

Explanation:

In essence, both issues (relevant) were addressed, that form the design of the system, and all of the information collected and during initial analysis along with all subsequent stages will, in turn, affect the design of the system. Being aware, that perhaps the data is obtained to establish the entities, attributes, or relations. In particular, partnerships, clearly outline, or cardinal-ties are shaped by company policies derived from the creator's information. Example problems and the probable effects on the layout may be:

It will create the file concurrently for all depts, or would like to build and execute the database simultaneously with one dept?  

How would the work be to design affect the development process? In other terms, determine the range of the system as well  

as its limits about the bottom-up, centralized, or decentralized.

Do you want, and would you like an integrated framework to develop a single module? (Inventory, production, shipping, billing, etc.)  

Would you like a product code, output change, and form of controlling the bolts and bolts and dept? Impact: design of the logical and physical server.  

Perhaps you'd like to monitor the sources of every lot a raw resources for the nuts and bolts manufacturing? Impact: design of the logical and physical server. Model E-R.  

Perhaps you'd like to monitor consumers receiving shipments of bolts and nuts? Impact: design of the logical and physical database. ER model.  

Its documents will you demand, or to whom can these documents be transmitted? What specific reporting requirements?  

Reactions to such concerns relate to the design, execution, testing, or subsequent functioning of the logical and physical system.

8 0
3 years ago
TRUE OR FALSE: THE BUILDER'S CLUB IS A PAID SUBSCRIPTION.
nadya68 [22]

Answer:

true

Explanation:

3 0
3 years ago
Read 2 more answers
Which scenario describes a student citing an online source in his or her work?
dimaraw [331]

Answer:

D Ling includes the name of a source’s author in her report.

Explanation: just use it lol

4 0
3 years ago
Read 2 more answers
You would like to find the average of cells C2, C3, and C4. What should the formula look like? = C2+C3+C4*3 =C2+C3+C4/3 =(C2+C3+
Marizza181 [45]

Answer:

c3 and c4 and c2 are different and same

Explanation:

average cells are ptoboxide

3 0
4 years ago
Read 2 more answers
A working model of a new product for testing purposes.
kotykmax [81]
Prototype is a working model for a product only for  testing purposes
6 0
3 years ago
Other questions:
  • Why is it important to save a print copy of electronic sources?
    6·1 answer
  • he function below takes one parameter: a list of strings (string_list). Complete the function to return a new list containing on
    5·2 answers
  • An organization’s IRP prioritizes containment over eradication. An incident has been discovered where an attacker outside of the
    5·1 answer
  • What does hdr stand for?
    6·2 answers
  • To pinpoint an earthquake's location, scientists need information from how many seismometers?
    8·1 answer
  • Which internet explorer 11 feature enables it to correctly display pages that were developed using older technologies?
    14·1 answer
  • 2. Design a class named Sandwich with data fields for description and price. Include a constructor that requires arguments for b
    14·1 answer
  • Materials such as copper, silver, and aluminum through which electric energy passes freely are called
    13·1 answer
  • Post as a reply your example of "data, which is processed into information" case - examples should not necessarily be related to
    13·1 answer
  • What new information, strategies, or techniques have you learned that will increase your technology skills?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!