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
eduard
3 years ago
13

What is the value of numX when this program is executed? if 3 < 5 and 8 != 3: numX = 3 else: numX = 7

Computers and Technology
2 answers:
Juliette [100K]3 years ago
6 0

Answer:

numX = 3

Explanation:

First, let's analyze what the code is showing:

If both conditions in the if-statement are true, then numX = 3. If one or both conditions are false, then numX = 7 ('and' means that both conditions have to be true for the if-statement to become true).

- this statement is true.

!=  - this statement is also true (!= means 'not equal').

Since both conditional statements are true, then numX must equal .

Hatshy [7]3 years ago
3 0

Answer:

numX = 3

Explanation:

First, let's analyze what the code is showing:

If both conditions in the if-statement are true, then numX = 3. If one or both conditions are false, then numX = 7 ('and' means that both conditions have to be true for the if-statement to become true).

3 - this statement is true.

8 != 3 - this statement is also true (!= means 'not equal').

Since both conditional statements are true, then numX must equal 3.

Hope this helps :)

You might be interested in
What can you say about the different website that you used? do they have in common?​
Harrizon [31]
They all have ads. Some have inappropriate ads while some have irrelevant ads with respect to the website your on.
8 0
2 years ago
What does a computer use long-term memory, or ROM, for?
AysviL [449]
The answer is B

Explanation: In contrast, a computer's hard disk or SDD is its long-term memory, where things are stored more or less permanently. ... Nearly all computers also have some way to store information for longer-term access, too.

5 0
2 years ago
Given the char * variables name1, name2, and name3, write a fragment of code that assigns the largest value to the variable max
Assoli18 [71]

Answer:

The following code as follows:

Code:

max=name1;   //define variable max that holds name1 variable value.

if (strcmp(name2, max)>0)  //if block.

{

   max=name2;  //assign value to max.

}

if (strcmp(name3,max)>0)   //if block.

{

  max=name3; //assign value to max.

}

Explanation:

In the above code, we define a variable that is max. The data type of max variable is the same as variables "name1, name2, and name3" that is "char". In the max variable, we assign the value of the name1 variable and use if block statement two times. In if block, we use strcmp() function that can be defined as:

  • In first if block we pass two variables in strcmp() function that is "name2 and max" that compare string value. If the name2 variable is greater then max variable value so, the max variable value is change by name2 variable that is "max=name2".
  • In second if block we pass two variables in strcmp() function that is "name3 and max" that compare string value. If the name3 variable is greater then max variable value so, the max variable value is change by name3 variable that is "max=name3".

4 0
2 years ago
Meg[] elements = {new Lois(), new Stewie(), new Meg(), new Brian()}; for (int i =0; i
Stells [14]

Complete question is attached as snapshot.

Answer:

This will result in a compilation error.

Here's the inheritance hierarchy:

Meg -> Lois -> Brian -> Stewie

Now Meg has 2 public Fxns, a() and toString().

Lois inherits from Meg and all its public functions as well but, overrides the a() fxn of its super class.

So finally Lois has fxns a(), b() and toString().

Brian extends Lois and inherits all the above listed fxns of Lois, but overrides the b() and toString() fxns.

Stewie extends Brian and inherits all the fxns of Brian, but overrides the a() and toString() fxns.

In the Main driver fxn, we call a() and b() methods of all these classes but, the base class Meg has no b() and it is not extending any class so its not available in its scope.

This results in a compilation error.

Explanation:

7 0
3 years ago
A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one child cl
Troyanec [42]

Answer:

The answer is A)

Explanation:

In programming languages like java you can only use single inhertance meaning a class can only inherit attributes from one class. But in other languanges like C you can have multiple inhertance

6 0
3 years ago
Other questions:
  • The use of computers to combine data from multiple sources and create electronic dossiers of detailed information on individuals
    8·1 answer
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. The company's pr
    10·1 answer
  • The _________ indicates the number of elements, or values, an array can hold
    14·1 answer
  • You and your friend who lives far away want to fairly and randomly select which of the two of you will travel to the other’s hom
    6·1 answer
  • Which type of financial institution typically has membership requirements?
    9·2 answers
  • If you are trying to improve your budget and spending, which option would save you the most money?
    13·2 answers
  • Explain what middleware is. Name a common middleware in two-tier client/server architecture for database applications.
    10·1 answer
  • Hi need help on this <br> what is cyberspace
    14·1 answer
  • Question 3
    13·1 answer
  • Write a method called removeHighPrice that will go through a provided ArrayList called prices and removes the first price that i
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!