aleasee1839 aleasee1839
  • 10-08-2020
  • Computers and Technology
contestada

Which branch structure does a program use to output "Yes" if a variable's value is positive, or "No" otherwise?

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 11-08-2020

Answer:

Selection control structure

Explanation:

This is often referred to as if-conditional statement;

This condition tests for a condition and performs a sequence of operation depending on the result of the condition;

Take for instance, the following program written in python

x = int(input("enter any number: "))

if x < 0:

  print("Yes")

else

  print("No")

The above checks if the input number is less than 0,

If the condition is true, it prints Yes

If otherwise, it prints No

Answer Link

Otras preguntas

I need help solving this
What are 3 causes of the boston tea party and 3 effecwhat are 3causes and effects of the boston tea party
The -------------- is a sheet of muscle that helps us breathe and it is situated just under the ribs and lungs.a. intercostalb. soleusc. obliqued. diaphragm
I need help solving this
Can you help me please. What are ethos, pathos and logos in ELA!?
Explain how the United States was able to defeat the Japanese in the Pacific.
name five kinds of landforms caused by plate movement, help!!
How would you add parentheses and brackets to make this sentence true: 45/2x4.7-4.4x6=54
The -------------- is a sheet of muscle that helps us breathe and it is situated just under the ribs and lungs.a. intercostalb. soleusc. obliqued. diaphragm
On what date did Columbus sail the ocean blue
good job