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
Eduardwww [97]
2 years ago
13

The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the g

aps to make that happen? 1 2 3
Computers and Technology
1 answer:
Arturiano [62]2 years ago
3 0
<h3>What is Python and its program?</h3>

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of other programs and isn't specialized for any specific problems.

Following are the python schedule to check input number is positive or negative:

Program: def is_positive(n):#defining the method is_positive that takes one variable in parameter

if (n > 0):#defining if block that check input number is positive

return True#return boolean value that is True

else:#else block

return "None"#return string value

n=int(input("Enter number: "))#defining n variable that input a number

print(is_positive(n))#using print process that calls and prints method return value

Output:

please find the connected file.

Program Explanation:

Defining the method "is_positive" that takes one variable "n" in the parameter.

Inside the method, if conditional block is determined that checks the input number is positive, if it's true, it will return a boolean value that is "True".

Otherwise, it will go to the else block, where it will produce a string value that is "None".

Outside the way, the "n" variable is declared to be an input number.

After the input value, a print method is used that calls the "is_positive" form and prints its return value.

To learn more about  Python, refer

brainly.com/question/23916407

#SPJ9

You might be interested in
A database can be used to manage which of the following for a website?
Oliga [24]
Images would probably be the best choice here
7 0
3 years ago
Consider the following class declaration: public class Square { private double sideLength; public double getArea() { return side
kipiarov [429]

Answer:

Here is the constructor:

public Square(double s) {  //constructor name is same as class name

sideLength = s;  } //s copied into sideLength field

Explanation:

The above constructor is a parameterized constructor which takes a double type variable s as argument. The name of constructor is same as the name of class.This constructor requires one parameters. This means that all declarations of Square objects must pass one argument to the Square() constructor as constructor Square() is called based on the number and types of the arguments passed and the argument passed should be one and of type double.

Here is where the constructor fits:

public class Square {

private double sideLength;

public Square(double s) {  

sideLength = s;  }

public double getArea() {

return sideLength * sideLength;}

public double getSideLength() {

return sideLength; } }

4 0
3 years ago
Engine coolant does all of the following except
Amiraneli [1.4K]
D prevent the formation of rust
8 0
3 years ago
Read 2 more answers
Help me help you...........
lyudmila [28]

Answer:

the 4th answer

Explanation:

w stage for width, h for height.

6 0
2 years ago
Can u please answer this​
Ivanshal [37]

Answer:

this worksheet can be found online

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • business owners and managers may first balk at the idea of mobile officer workers because there may appear to be a lack of ___ w
    9·1 answer
  • How can i take out a random (double) number in between 5.0 to 15.0 in c++?
    7·1 answer
  • Q10: Putting it all together (0.75 points) Here, we'll update the values in dictionary, storing the output in a dictionary calle
    5·1 answer
  • A ________ algorithm is a method of locating a specific item of information in a larger collection of data.
    8·1 answer
  • Write an application that allows a user to input the height and width of a rectangle. It should output the area and perimeter of
    10·1 answer
  • Which approach is ideal for ensuring that a Webpage is maintained and does not appear neglected to users?
    13·1 answer
  • Alexis received paychecks from both her jobs and she would like to deposit them. One check is for $62.88 and the other is $523.2
    9·1 answer
  • Write any two disadvantage of First generations computers​
    14·1 answer
  • List and briefly define the four main elements of a computer.​
    9·1 answer
  • Difine Mainframe Computer~<br><br><br><br><br><br><br><img src="https://tex.z-dn.net/?f=%20%5C%3A%20%20%5C%3A%20" id="TexFormula
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!