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
pogonyaev
4 years ago
9

Write a negate function that takes a number and returns the negation of that number. Also write a large_num function that takes

a number, and returns True if that number is bigger than 10000, and False otherwise. Additionally, write some code to test your functions.
Computers and Technology
1 answer:
steposvetlana [31]4 years ago
4 0

Answer:

# negate function

def negate(number):

# return the negation of number

return -number

# large_num function

def large_num(number):

# return true or false based on the condition

return number > 10000

print(negate(67))

print(large_num(12356))

Explanation:

The above functions is commented and written in python.

The negate function take a number as parameter and return the negation of the number by adding the minus sign to the front of the number.

The large_num function take a number as parameter and return True or False depending on the results of evaluating the Boolean expression. If number is greater than 10000, it returns True else it returns False.

print(negate(67)) will output -67

print(large_num(12356)) will output True.

You might be interested in
When computers connect to one another to share information, but are not dependent on each other to work, they are connected thro
Andrej [43]
Peer-to-peer would be my best bet. Hope this helps. 
3 0
3 years ago
Read 2 more answers
Steve left his computer switched on in his room and went out to have breakfast. When he returned, he saw that the monitor had be
yanalaym [24]

Answer:

B

Explanation:

5 0
4 years ago
What is one difference between the Simple Gear Train with Same Size Gears and Simple Gear Train with Different Size Gears?
polet [3.4K]

Answer:

One difference between a Simple Gear train with Same Size Gears and Simple Gear Train with Different Size Gears is the that the number of rotations of both shafts in the Simple Gear Train with Same Size Gears is the same the number of rotations of both shafts in the simple Gear Train with Different Size Gears are different

Explanation:

A simple gear train is one in which each shaft has only one shaft, and the motion of one shaft in transmitted to the other when the gears are in contact

5 0
3 years ago
Create a program that contains 4 methods / functions... main(), getTestScores(), calcAverage(), and displayAverage(). The main()
jeyben [28]

Answer:

import java.util.Scanner;

public class  num6{

   static int getTestScores(){

       System.out.println("Enter the Score");

       Scanner in = new Scanner(System.in);

       int score = in.nextInt();

       return score;

   }

   static double calcAverage(int score1, int score2, int score3){

       return (score1+score2+score3)/3;

   }

   static void displayAverage(double ave){

       System.out.println("The Average is "+ave);

   }

   public static void main(String[] args) {

       int num1 = getTestScores();

       int num2 = getTestScores();

       int num3 = getTestScores();

       //Calling Calculate Average

       double average = calcAverage(num1,num2,num3);

       //Calling displayAverage

       displayAverage(average);

   }

}

Explanation:

  • Using Java programming Language
  • Create the four methods
  • getTestScores() Uses the Scanner Class to receive an in variable and return it
  • calcAverage() accepts three ints as parameter calculates their average and return it
  • displayAverage() Accepts a double and prints it out with a concatenated string as message
  • In the Main Method, getTestScores is called three times to obtain three numbers from the user
  • calAverage is called and handed the three numbers
  • printAverage is called to output the calculated average
8 0
3 years ago
Net neutrality refers to the idea that Internet service providers (ISPs), including cable Internet and wireless carriers, should
Vedmedyk [2.9K]

Answer:

True is the right answer.

Explanation:

The term net neutrality can be defined as the principle which states that all internet service providers treat all communication channels i.e wired or wireless channels equally.

In net neutrality, there can not be any discrimination on the basis of the website, user, protocol, hardware or application.

In net neutrality, the internet service provider can not charge the user on the basis of some specific content.

Hence the most appropriate answer is true.

8 0
4 years ago
Read 2 more answers
Other questions:
  • You're trying to improve an ad's perceived quality so it performs better during an ad auction. What change would have the least-
    15·1 answer
  • Select the correct answer. Linda has written a program that works well on various operating systems, but she needs to increase t
    10·1 answer
  • What is a computer briage coures​
    15·1 answer
  • Write a C++ program that allows the user to enter double values. Display one of two messages: "The first number you entered is l
    9·1 answer
  • What does lurch mean
    14·2 answers
  • technician is dispatched to troubleshoot a user's computer. After performing diagnostics, the technician determines that drive t
    5·1 answer
  • The signature area in a cover letter includes the sender's first and last name, followed by his/her job title (if applicable). *
    13·1 answer
  • Who here would like to play among us with me? <br> Time: Friday, November 13
    14·1 answer
  • Which terms represent the two types of client requirements?
    7·2 answers
  • Which of the following is an operating system?<br> MacBook Air<br> Windows 10<br> Dell
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!