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
Watson Studio is the IBM premier integrated development environment for data science and artificial intelligence practitioners.
fomenos

Answer:

c. Using the Data Refinery tool

Explanation:

Data wrangling and tidying in Data Science is the process whereby data to be analysed is obtained, cleaned and arranged before it is analysed in the environment.

Since Watson Studio happens to be an IBM premier integrated development environment for data science and artificial intelligence practitioners, there is need for them to have data softwares to make data scientists practitioners' works easier.

<em>In this scenario, the best tools to aid in tidying data in the Watson studio would be the use of </em><u><em>Data Refinery Tool.</em></u>

3 0
3 years ago
Explain the role of computers in accounting
Inessa05 [86]

Answer:

A computer helps accountants store and access financial records, make changes and alleviate the need to keep paper files. If paper work is needed, computer files can easily be accessed and printed along with any changes the accountant makes at any given time.

8 0
2 years ago
"write a program to play and score the paper-rock-scissor game. each of two users types in either p, r, or s. the program then a
algol13

The program is an illustration of conditional statements.

Conditional statements are used to execute instructions, if and only if certain <em>condition or conditions </em>are met.

Take for instance: <em>If b = 5, print "ab"</em>

The above print statement will only be executed, if the <em>value of b is 5</em>

The paper-rock-scissor program in Python where comments are used to explain each line is as follows,  

#This imports the random module

import random

#This is used to control the repetition of the game

playagain ="T"

#The following is repeated until the user chooses not to play again

while(playagain == "T"):

   #This generates a random choice for the computer

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

   #This gets input for the player

   player = input('Choose: ')

   #If the player and computer choose the selection

   if player == computer:

       #Then, it's a tie

       print('A tie - Both players chose '+player)

   #If the player wins

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

       #This prints "player won" and the reason

       print('Player won! '+player +' beats '+computer)

   #If otherwise,

   else:

       #This prints "computer won" and the reason

       print('Computer won! '+computer+' beats '+player)

   #This asks if the player wants to play again

   playagain = input("Play again? T/F: ")

At the end of each round,

  • The program displays the winner
  • Or prints a tie, if there's a tie

See attachment for sample run

Read more about conditional statements at:

brainly.com/question/22078945

8 0
2 years ago
What is Groovefunnels?
Andreyy89

GrooveFunnels is a game-changer and it’s disrupting the market quite a bit.
5 0
3 years ago
Read 2 more answers
Consider a classful IPv4 address 200.200.200.200? What is its implied subnet mask? If we take the same address and append the CI
topjm [15]

Answer:

a. 255.255.255.0 (class C)

b. 255.255.255.224

Explanation:

Here, we want to give the implied subnet mask of the given classful IPV4 address

We proceed as follows;

Given IPv4 address: 200.200.200.200

Classes

Class A : 0.0.0.0 to 127.255.255.255

Class B: 128.0.0.0 to 191.255.255.255

Class C: 192.0.0.0 to 223.255.255.255

Class D: 224.0.0.0 to 239.255.255.255

so 200.200.200.200 belongs to Class C and it's subnet mask is 255.255.255.0

In CIDR(Classless Inter Domain Routing)

subnet /27 bits means 27 1s and 5 0s. so subnet

i.e 11111111.11111111.11111111.11100000 which in dotted decimal format is 255.255.255.224 .

4 0
3 years ago
Other questions:
  • You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Wri
    5·1 answer
  • The Active Directory Users and Computers tool can be used to:______.
    11·1 answer
  • A(n) ________ software installation enables you to decide which features you want to install on the hard drive. Select one: A. f
    10·1 answer
  • In JavaScript, which of the statements below can be used for string declaration?
    11·1 answer
  • A word object in an excel worksheet to activate the word features
    9·1 answer
  • Many 12-15 yrs hv access to the internet which cannot be supervised by an adult.i need 5 problems tht this might cause
    5·1 answer
  • It is an island country; it fought against us in World War II; it is known for sushi.
    14·2 answers
  • Technical term of stealing personal information in social media.​
    5·1 answer
  • 20.
    8·1 answer
  • Why do relational databases use primary keys and foreign keys?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!