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
tiny-mole [99]
3 years ago
10

Write a function call it isEvenPositiveInt which takes an integer x and return true if x is positive and also even. Note isinsta

nce(x, int) will return True if x is an integer
So

>>> isinstance (23, int)

True

>>> isinstance (12.34, int)

False

>>> isinstance (12.34, float)

True
Computers and Technology
1 answer:
Anna11 [10]3 years ago
5 0

Answer:

The program to this question as follows:

Program:

def isEvenPositiveInt(x): #defining method isEvenPositiveInt

   if x>0: #checking number is positive or not

       if x%2==0: #check true condition

           return True #return value True

       else:

           return False #return value False

   return False #return value False

print(isEvenPositiveInt(24)) #calling method and print return value

print(isEvenPositiveInt(-24)) #calling method and print return value

print(isEvenPositiveInt(23)) #calling method and print return value

Output:

True

False

False

Explanation:

In the above Python program, a method "isEvenPositiveInt" is defined, that accepts a variable "x" as its parameter, inside the method a conditional statement is used, which can be described as follows:

  • In the if block the condition "x>0" is passed, that check value is positive, if this condition is true, it will go to another if block.
  • In another, if block is defined, that checks the inserted value is even or not, if the value is even it will return "true", otherwise it will go to the else part, that returns "false".  
You might be interested in
Alt +f4 is a short cut of close a document in MS word /ture /false​
vesna_86 [32]

Answer:

True.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Computer science, there are specific key combinations (short cut) that avail end users the opportunity to perform specific functions without having to go through a series of step.

For example, when you press the Alt button and function key 4 (F4) at the same time, it would close the current open window.

Hence, Alt + F4 is a short cut key that can be used to close a document in MS word.

8 0
2 years ago
Mattias's friend asked him to critique his presentation about gorillas. Mattias noticed that there weren't any images of gorilla
Deffense [45]

Answer:

c

Explanation:

7 0
3 years ago
Who want followers on Instagram... gotta follow back
Alexxx [7]

Explanation:

I dont have Instagram....

6 0
2 years ago
Read 2 more answers
c++ Write a statement that increments (adds 1 to) one and only one of these five variables: reverseDrivers parkedDrivers slowDri
Mazyrski [523]

Answer:

The following statement are:

if(speed < 0) // if statement

{

reverseDrivers++; //if the speed is less than 0, then increment in "reverseDrivers"

}

else if(speed < 1) //else if statement

{

parkedDrivers++; //speed is less than 1, than increments in "parkedDrivers"

}

else if(speed < 40)

{

slowDrivers++; //speed is less then 40, than increment in "slowDriver"

}

else if(speed <= 65)

{

safeDrivers++; //speed is less than or equal to 40, then increment in "safeDriver"

}

else

{

speeders++; //else increment in speeders

}

Explanation:

From the following statement their are certain condition arises

If the speed is less than 0, then increments the “reverseDrivers” variable by 1.

If the speed is less than 1, then increments the “parkDriver” variable by 1.

If speed is less than 40, then increment in "slowDriver" variable by 1.

If speed is less than or equal to 40, then increment in "safeDriver" variable by 1.

Otherwise increment in "speeders"

7 0
3 years ago
While building a high-end gaming system, you are attempting to install the EVGA GeForce GTX 1080 graphics card and discover ther
polet [3.4K]

Answer:

I will use a riser card to install the card parallel to the motherboard.

Explanation:

If you attempted to install a GPU like this and it stands tall, then this means that you do not have enough room for the card. Instead of purchasing a new case that will allow the GPU to seat comfortably, you can buy a riser card. A riser card seats at a right angular position and is built to extend a motherboard slot. I expect a motherboard that supports an EVGA GeForce GTX 1080 graphics card to support a riser card because not all boards support a riser card. Once it is installed, the card will rest on the motherboard and will rotate the GPU to seat parallel with the motherboard.

5 0
3 years ago
Other questions:
  • Lossless and lossy are the two (2) universally known categories of compression algorithms. Compare the two (2) categories of alg
    8·2 answers
  • Due largely to the prevalence of reading them on screens rather than in​ print, the body text of most contemporary documents now
    8·1 answer
  • Which osi model layer manages data encryption?
    14·1 answer
  • Describe an application where a parallel circuit might work better than a series circuit.
    15·1 answer
  • Consider the following protocol for concurrency control. The database system assigns each transaction a unique and strictly incr
    6·1 answer
  • Write a program which:
    10·1 answer
  • _____ is a subset of a data warehouse in which only a focused portion of the data warehouse information is kept. A. Data diction
    6·1 answer
  • Alright, don't judge me, this is a question that involves my Childhood game PvZ GW 2. So I noticed mods and stuff that get uploa
    12·2 answers
  • A group of computers that are interconnected in order to share information or documents is called what?
    13·1 answer
  • A column does not consist of
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!