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
jok3333 [9.3K]
2 years ago
15

What is the output of this program? numA = 2 numB = 3 if numA == 2 or numB == 2: print("yes") elif numA == 2 and numB == 3: prin

t("no") Output:
Computers and Technology
1 answer:
Contact [7]2 years ago
5 0

Answer:

The outcome would be "yes".

Explenation:

numA = 2

numB = 3

if numA == 2 or numB == 2:

   print("yes")

elif numA == 2 and numB == 3:

   print("no")

<u>numA = 2</u>

This line of code declares the variable numA and gives it a value of 2

<u>numB = 3</u>

This line of code declares the variable numB and gives it a value of 3

<u>if numA == 2 or numB == 2:</u>

This part activate the next line of code only if the statement (numA == 2 or numB == 2<u>)</u> is True

   <u>print("yes")</u>

   This code prints out "yes" in the terminal.

<u>elif numA == 2 and numB == 3:</u>

This line of code is similar to the ifstatement above. The code below activates only if the statement (numA == 2 and numB == 3) is True and the previous ifstatement wasn't True.

   <u>print("no")</u>

   This code prints out "no" in the terminal.

You might be interested in
Why can’t I “change the country” on settings??<br> (In this app)
Serjik [45]
I don't think it has an option to change your country. If you'd like to see things in a different language, that's probably a different story.
7 0
3 years ago
Name an analog quantity other than temperature and sound
liq [111]
I know that this might be wrong but is it light?
6 0
3 years ago
. Gathering information with your eyes is called __________.
vovikov84 [41]
D. Visual Perception
4 0
3 years ago
Write a Java program that prompts the user to enter integer values for the sides of a triangle and then displays the values and
satela [25.4K]

Answer:

import java.util.Scanner;

public class triangle {

       public static void main (String [] args) {

           int sideOne, sideTwo, sideThree;

           Scanner in = new Scanner (System.in);

           System.out.println("Enter the first side of the triangle");

           sideOne = in.nextInt();

           System.out.println("Enter the secon side of the triangle");

           sideTwo = in.nextInt();

           System.out.println("Enter the third side of the triangle");

           sideThree = in.nextInt();

           if ( sideOne<=0||sideTwo<=0|| sideThree<=0){

               System.out.println(" The Values enter are "+sideOne+ "," +sideThree+ ","+sideThree+ " These values don't make a valid triangle");

           }

           else if ((sideOne + sideTwo> sideThree) || (sideOne+sideThree > sideTwo) || (sideThree+sideTwo > sideOne))

           {

               System.out.println ("The triangle is Valid");

           }

           else {

               System.out.println(" The Values enter are "+sideOne+ "," +sideTwo+ ","+sideThree+ " These values don't make a valid triangle");

           }

       }

Explanation:

for a Triangle to be Valid one of the three sides of the triangle must greater than the other two sides.  The code above enforces this condition using an if statement in combination with the Or Operator

The following conditions where enforced

side one, side two and side three != 0

Side One + Side Three > Side Two

Side Three + Side Two> Side One

Side Two + Side One > Side Three

7 0
3 years ago
How does theatre compare with movies or television? What makes it similar to movies and television? What makes it different?
givi [52]

Answer:

you cant mess up in theatre but you can redo scences in movies, thay both have acting in them

Explanation:

im a theatre person

3 0
3 years ago
Other questions:
  • An icon in a document preset that looks like the play button on a YT video, what type of document is the preset meant to be used
    13·2 answers
  • Write a program that ask the user to enter air water or Steele and the distance that a sound wave will travel in the medium the
    6·1 answer
  • Describe the process of sorting the following list using the above algorithm:
    7·1 answer
  • Why are medical related professions and human resources important? ​
    8·1 answer
  • Risk taker positive or negative​
    8·1 answer
  • Match the following pls help
    5·1 answer
  • If u play codm pls tell me ur username
    9·2 answers
  • an existing technology that would allow users to transfer images from the camera to the computer without connecting them
    8·1 answer
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
  • To use the replace feature we can simply just press Carl+h,Carl+c,Carl+r
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!