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
Gnoma [55]
2 years ago
10

Define a function below, posodd_number_filter, which takes a single numerical argument. Complete the function to return accepted

if the input is positive and odd. Otherwise, return rejected.
Computers and Technology
1 answer:
Vaselesa [24]2 years ago
5 0

The program is an illustration of functions.

<h3>What are functions?</h3>

Functions are set of program statements that are executed when called or evoked.

<h3>The main program</h3>

The function written in Python, where comments are used to explain each line of the program is as follows:

#This defines the function

def posodd_number_filter(num):

   #This checks if the function is odd and positive

   if num >0 and num%2 ==1:

       #If yes, this returns Accepted

       return "Accepted"

   #If no, this returns Rejected

   return "Rejected"

Read more about functions at:

brainly.com/question/14284563

You might be interested in
Write the logical Expression and Draw the Truth table for the <br> following questions
Alja [10]

The logical expressions are

  • (X NOR Y ) OR Z ⇒ (\bar X  \bar + \bar Y) + Z
  • (A NAND B) AND NOT C ⇒ (\bar A \bar \cdot\bar B) \cdot \bar C

<h3>How to determine the logical expressions?</h3>

<u>Logical expression 1</u>

X and Y are linked by the NOR gate.

So, we have:

X NOR Y

The X NOR Y is linked to Z by the OR gate.

So, we have:

(X NOR Y) OR Z

Hence, the logical expression is (X NOR Y ) OR Z ⇒ (\bar X  \bar + \bar Y) + Z

<u>Logical expression 2</u>

A and B are linked by the NAND gate.

So, we have:

A NAND B

The A NAND B is linked to C by the AND gate.

So, we have:

(A NAND B) AND C

Hence, the logical expression is (A NAND B) AND NOT C ⇒ (\bar A \bar \cdot\bar B) \cdot \bar C

See attachment for the truth tables

Read more about truth tables at:

brainly.com/question/27989881

#SPJ1

6 0
2 years ago
Explain how abstraction is used in a GPS system?
zhenek [66]
I hope that this answer will help u to solve your problem. But u have tto take the importance clues only .

5 0
3 years ago
Network id is 192.168.10.32/28. what would be the ip address, if you assign the last available ip address in the range
Yakvenalex [24]
192.168.10.47 would be the multicast address for this network.
6 0
3 years ago
Read 2 more answers
Interactive web designs engage a viewer using changing visual, sound, and interactive features. A great example of this was the
MrRissso [65]

Answer:

Museum of Modern Art

Explanation:

Museum of Modern Art is where many works of Art are displayed or exhibited.

An interactive web design engages a user with its user friendliness of changing visual, sound and other interactive features.

5 0
3 years ago
If a user copies the formula D15 into D16, what would the formula read in D16?
ella [17]
=B16*C16 hope that helped
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which is NOT a way the network operating sys-
    6·1 answer
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
    10·1 answer
  • Where is a 3D modeler most likely to work?
    6·1 answer
  • Our readings so far explored computer hardware and software, in particular operating systems and application software. There are
    11·1 answer
  • Which of the following best describes the purpose of a design specification?
    14·2 answers
  • What are some of the benefits of project
    7·1 answer
  • . It has been said that technology will be the end of management. Maybe. How about artificial intelligence
    9·1 answer
  • Leslie’s parents put a big dry-erase board on the refrigerator and let the kids write suggestions for how to organize and assign
    14·1 answer
  • Which educational qualification would help a candidate get a job as a computer systems engineer?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!