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 system should enable the staff of each academic department to examine the courses offered by their department, add and remov
Ganezh [65]

Answer:

See attached picture.

Explanation:

See attached picture.

3 0
3 years ago
Question # 9
Ganezh [65]

Answer:

flight stimulators are used to train astronaut and design simple air craft

8 0
2 years ago
Which three IP addresses may be pinged by the Test Management Network feature in the ESXi hosts DCUI
Sholpan [36]

Answer:

Primary DNS server

Secondary DNS server

Default gateway

Explanation:

The following tests are performed by ESXi:

  • Pings the subnet gateway that is stated.
  • Pings the primary DNS server that is stated.
  • Pings the secondary DNS server that is stated.
  • Ensure that the hostname of the ESXi host is resolved by it.

Based on the above, the three IP addresses may be pinged by the Test Management Network feature in the ESXi hosts DCUI are are therefore the following:

  • Primary DNS server
  • Secondary DNS server
  • Default gateway
5 0
3 years ago
Which of these photoshoots would benefit from using reflectors?
Vlada [557]

Answer:

I dont really know

Explanation:

So first you would use your brain for this.

2) you would ask your sibling or freind

3) then parents

4) then teacher

5) AND IF you really dont know, use brainly and hope u dont have idoits like me answer this question

8 0
3 years ago
Find the maker(s) of the PC(s) with the fastest processor among all the PCs that have the smallest amount of RAM.
aleksley [76]

Answer:

the makers of PC is Charles's babbage.analog is has small amount of ram

3 0
2 years ago
Other questions:
  • What is pressure?
    7·2 answers
  • Frank has created a résumé and separated the sections using headings. How can he set the headings apart from normal text?
    13·1 answer
  • Using the mouse to move or copy cells is called ____.
    15·1 answer
  • Which type of error is a random error
    13·2 answers
  • Write a program that reads three numbers and print the largest one step by step answer
    9·1 answer
  • Your employer is opening a new location, and the IT director has assigned you the task of calculating the subnet numbers for the
    14·1 answer
  • Which term describes the distance from one point on a wave to the same point on the next wave?
    13·2 answers
  • What is the FaFASA4caster used for
    10·1 answer
  • . When attempting to minimize memory usage, the most efficient way to do group processing when using the MEANS procedure is to u
    13·1 answer
  • Question 2 of 10
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!