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
Hypertension occurs when blood pressure is too high.
Ivan
True, hypertension is when your blood pressure is to high.
Please mark as brainliest
8 0
3 years ago
Differentiate between soft copy output and hard copy output?​
katen-ka-za [31]

a hard copy stores data and information in the form of physical files it may be images text photographs and more a soft copy data and information in the form of virtual file saved on a computer or a drive you can preserve a hard copy for two long because its day subjected to wear and tear

4 0
2 years ago
Read 2 more answers
User 2.0 is most likely to Multiple Choice passively read and search for content. depend on content creators and avoid expressin
Ahat [919]

User 2.0 is most likely to: use the Internet for social connection.

<h3>What is User 2.0?</h3>

User 2.0 which is an aspect of Web 2.0 defines the latest form of the internet that allows users to interact with each other. This form of the internet is easy to use and requires participation by users.

So, a possible feature of User 2.0 will be the ability to use the internet for socialization.

Learn more about User 2.0 here:

brainly.com/question/3913924

5 0
2 years ago
Necesito cuatro aspectos de cómo a impactado el Internet en la sociedad y educación moderna
Likurg_2 [28]

Answer:

bancho chup kar re

Explanation:

ma chuda!!

5 0
2 years ago
write a program that convert binary number to decimal. I mean the input should be binary number and the output decimal number!!.
wolverine [178]

Answer:

#include<iostream>

#include<math.h>

using namespace std;

//main function

int main(){

   //initialization

   long b1;

   int d1=0,count_pos=0;

//display the message

   cout<<"Enter the binary number: ";

   cin>>b1;  //store the value

   //loop for take the digit one by one

   while(b1!=0){

       int rem1 = b1%10;

       d1 = d1 + rem1*pow(2,count_pos);

       count_pos++;

       b1 = b1/10;

   }

   //display the output

   cout<<"The decimal number is: "<<d1<<endl;

}

Explanation:

Create the main function and initialize the variables. Then, display the message on the screen by using the instruction cout and then, store the input enter by the user into the variable. Here, the variable declares with type 'long' because of the size of the input.

After that, we take a while loop for splitting the binary number into the digits and then we can do the operation.

Let's understand how you can convert binary to decimal with an example:

let the binary number is 1001:

decimal number is [tex]1*2^{3}+0*2^{2}+0*2^{1}+1*2^{0}=9[/tex]

we put the same algorithms in the code. split the number into digit and then multiply with n raised to the power of 2 here, n is the position of digit from left to right.

NOTE: Position starts from zero.

and then, add the values. this process continues until the number is not zero.

After that, display the output on the screen.

8 0
3 years ago
Other questions:
  • A _____ is a device that not only provides surge protection, but also furnishes desktop computers and network devices with batte
    7·1 answer
  • The location on the Word screen where text will be entered is known as the _____.
    14·1 answer
  • Think back over the information presented in the lesson about how you can skillfully use the Internet when doing research. Selec
    14·1 answer
  • Transmits data as pulses of light through tiny tubes of glass Uses standard telephone lines to create a high-speed connection Co
    5·1 answer
  • What kind of physical device is an evil twin access point? What does the evil twin do after initial association when the victim
    12·1 answer
  • n physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initia
    9·1 answer
  • What is a feature of Print Preview? Fit to Document Fit to Margin Fit to Page Fit to Size
    5·2 answers
  • Cuales son las funcione basica de la computadora​
    9·1 answer
  • A soft news story and a feature story are the same thing.<br> O True<br> O False<br> HELLPP ASSAAAP
    12·2 answers
  • Draw
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!