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
Alex73 [517]
3 years ago
6

Write an if-else statement to describe an object. Print "Balloon" if isBalloon is true and isRed is false. Print "Red balloon" i

f isBalloon and isRed are both true. Print "Not a balloon" otherwise. End with newline.
Computers and Technology
2 answers:
madreJ [45]3 years ago
7 0
If (isBalloon == true && isRed == false) {
   print ("Balloon")
}
elif (isBalloon == true && isRed == true) {
   print ("Red Balloon")
}
else {
   print ("Not a balloon")
}
Please mark me as brainliest. Thanks!!
AnnZ [28]3 years ago
4 0

Answer:

The answer to this question can be given as:

// code to if-else ladder statement can be given as:

if(isBalloon==true && isRed!=true) //if block

{

cout<<"Balloon"; //message

}

else if ((isBalloon && isRed)==true) //else if block

{

cout<<"Red balloon"; //message

}

else //else block

{

cout<<"Not a balloon"; //message

}

Explanation:

In the above code, we use the if-else ladder statement. In this statement, we use two variables and AND logical operator. AND operator executes when both condition is true. The following if-else ladder statement can be described as:

  • In the if block, we check the two conditions that the variable isBalloon value is "true" and the variable isRed value is "false". Then it prints "Balloon" on console.
  • In the else-if block, we check if both variables (isBalloon and isRed) value is "true". Then it prints "Red balloon" on console.
  • finally, if both above condition is false then It print "Not a balloon" on console.

You might be interested in
Please help!!!!<br> Data means only facts. <br> A. TRUE B. FALSE
vredina [299]
B false data does not only have to be facts
6 0
3 years ago
100 POINTS PLEASE HELP
Oksana_A [137]

Answer:

hope this helped ,do consider giving brainliest

Explanation:

import numpy as np

#PrintArray Function

def printArray(array):

for i in range(len(array)):

for j in range(len(array[i])):

print(array[i][j], end= " ")

print()

#Flip horizontal function

def flipHorizontal(array):

#reversing the order of arrays

array2 = np.fliplr(array).copy() printArray(array2)

#Flip Vertical function

def flipVertical(array):

#Preserving the order of array and reversing each array.

array3 = np.flipud(array).copy() printArray(array3)

#Main() function def main():

array = [[0,2,0,0,0],[0,2,0,0,0],[0,2,2,0,0],[0,2,0,2,0],[0,2,0,0,2]]

print("The array: \n")

printArray(array)

print("\nFlipped horizontally: \n") flipHorizontal(array)

print("\nFlipped vertically: \n") flipVertical(array)

if __name__=="__main__":

main()Explanation:

6 0
2 years ago
Read 2 more answers
Every windows service has the 3 start types what are those service types?
spayn [35]

Answer:

You can stop, pause, start, delay start, or resume each service as appropriate. You can also modify the start mechanism (Manual or Automatic) or specify an account. Windows Services broadly fall into three categories depending on the actions and applications they control: Local Services, Network Services and System.

5 0
3 years ago
All of the following are tips for the Aspire English tests except
Alchen [17]

Answer:

A. there is no need to consider the elements of writing in the

underlined portion of a passage.

Explanation:

The options are:

A. there is no need to consider the elements of writing in the

underlined portion of a passage.

B. reread the sentence using your selected answer.

C. determine the best answer.

D. read and consider all of the answer choices before choosing the

one that best responds to the question.

All the options are correct given above except for the first option. The first option is not correct as it is not the right idea to not consider the elements of writing in the underlined portion of a passage. We just cannot neglect this. And hence, the correct option is A.

5 0
3 years ago
What did you predict will happen? Check all that apply. The lioness will attack Thisbe. Thisbe will stay hidden in the cave to a
sesenic [268]

Hi,


Everything applies. It is impossible to predict based on the current data. All scenarios are possible with equal possibility.


Hope this helps.

r3t40

5 0
4 years ago
Read 2 more answers
Other questions:
  • When you develop an application using a 3-layer architecture, the layer that provides the user interface is called the _____ lay
    13·1 answer
  • Universal Windows Platform is designed for which Windows 10 version?
    7·1 answer
  • Which type of cause and effect organizer would be best for alisha to understand how crude oil becomes gasoline?
    6·2 answers
  • List seven basic internal components found in a computer tower
    13·1 answer
  • How is the numeric string that makes up a digital signature created?
    5·1 answer
  • Norman Bates has a very unusual hobby what is it?
    13·1 answer
  • Middleware is software used to: a. connect processes running on different computer systems across a network. b. integrate a comp
    8·1 answer
  • A Chief Information Security Officer (CISO) needs to establish a KRI for a particular system. The system holds archives of contr
    13·1 answer
  • ​Microsoft claims that the microsoft project software can _____.
    11·1 answer
  • Which securities protect data through processes, procedures,decisions,and user pernissions. Determines where and how data can be
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!