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
The scientific process is most similar to what
Papessa [141]

Answer:

A dyagram

Explanation:

Have a nice day.

-London

8 0
2 years ago
NoSQL is a programming language used to create mobile apps.<br> a) True<br> b) False
finlep [7]

Answer:

False

Explanation:

7 0
2 years ago
Read 2 more answers
Why did it take fewer 1-inch tiles than 1-centimeter tiles to measure the length of the cookie cutter?​
Romashka-Z-Leto [24]

The inch tiles are larger, meaning they use less space.

6 0
3 years ago
Which emails go to the draft folder
castortr0y [4]

Answer:

Hi there, the only emails that go to the draft folder are the emails that you start to write and then you don't finish it so you can go back and finish writing it later.

Explanation:

<h2>Hope this helps!! Please consider marking brainliest! Have a good one!!</h2>
6 0
2 years ago
Read 2 more answers
Methods used to change variables are called ______. equals accessors toString void mutators
Sindrei [870]
Look this up on Quizlet. Besure to check the question and the answers carefully by using "define + the vocabulary word" you think answers the question.

Here is the exact site: just copy it and search and click...

<span>AP Comp Sci Chapter 5</span>
6 0
2 years ago
Other questions:
  • What is the role of programmers in an organization?
    6·1 answer
  • How to reply to text from unknown number?
    11·1 answer
  • You should use html elements instead of server controls when
    11·1 answer
  • 5. How should you use LinkedIn Answers as a professional?
    8·1 answer
  • How to program a game​
    7·2 answers
  • A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
    15·1 answer
  • What are the physical aspect of a presentation​
    7·1 answer
  • Plz subscribe my yt gaming channel <br>FIREAZZ GAMING​
    8·2 answers
  • Rewrite the Espresso Counter program to Swap or interchange any two rows of the output. Copy and paste just the interchanged par
    14·1 answer
  • You hide three worksheets in a workbook and need to unhide them. How can you accomplish this?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!