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
xz_007 [3.2K]
3 years ago
10

Functions that do not return values _________.

Computers and Technology
2 answers:
ASHA 777 [7]3 years ago
6 0

Answer:

Functions that do not return values do not have return statements.

Explanation:

Lets take an example of a function in Python

def FunctionName(arguments)

function body  

The function that do not return value does not need to have a return statement.

It works the same as void function C++

The function that do not return values and has no return statements will end when the program control reaches end of the function body. This works same as void but in Python None is returned when such a function ends successfully. None is a special value which is returned in functions that do not have return statements.

Lets take an example of a few functions that have return values and that do not have return values.

def addition(x,y):

   a = b + c

summ = addition(1,2)

print(summ)

This function has no return values so there is no need to have a return statement. This will print None in the output

Another example is of the function that has a return statement and return values.

def addition(x,y):

   a = b + c

   return a

summ = addition(1,2)

print(summ)

Now this will give 3 as output and here return c is written which means that the function returns values.

seropon [69]3 years ago
3 0

Answer:

Do not have return statements.

Explanation:

In programming, a function is a block or group of program statements, specifically written to execute a given task. It is defined in any point of the program and called upon to interrupt the normal program flow.

Functions have locally defined variables and can also use global variable as well. When it is called, it may or may require an argument and a return statement of the needed parameter is defined. The return void statement returns a 0 value.

If a function is defined, but not called, it will not be executed and if a return statement is not defined in the function, it executed function would not return any value to the normal program flow.

You might be interested in
Can you structure this code in if-statements?
Naddika [18.5K]
Not sure what quizScore1-5 is, but here it is. Also, I'm not entirely sure what language you're working with here, but null can't be returned as an integer. If it were a string, for example, it'd be possible as string is an object reference type.

public int getData(int dataNumber)
{
    if (dataNumber == 1)
        return quizScore1;
    else if (dataNumber == 2)
        return quizScore2;
    else if (dataNumber == 3)
        return quizScore3;
    else if (dataNumber == 4)
        return quizScore4;
    else if (dataNumber == 5)
        return quizScore5;
    else
        return 0;
}
3 0
3 years ago
What does usb stand for
e-lub [12.9K]
Universal Serial Bus
8 0
3 years ago
Read 2 more answers
Write 3 3 advantage and disadvantage of computer​
navik [9.2K]

Answer:

Advantages: computers don't make human error

It can be used for communication

Ease of access

Disadvantages: computers can be a distraction

Potential loss of privacy

It can limit learning and create a dependency

8 0
2 years ago
What should you do in order to have access to the header and footer tools? Open the View tab. Open the Page Setup dialog box. Op
Svetach [21]

Answer:

Step 1  - Open the View tab.

Step 2 - Open the Page Setup dialog box

Step 3 - Open the header and footer tool.

Step 4 - Click OK.

Explanation:

In order to access to the header and footer tools

Step 1  - Open the View tab.

Step 2 - Open the Page Setup dialog box

Step 3 - Open the header and footer tool.

Step 4 - Click OK.

4 0
2 years ago
A series of inventions led to the creation of the electronic digital computer shortly after this war..
lesantik [10]
What is world war 2? bob
4 0
3 years ago
Other questions:
  • What does CTR stand for?
    10·2 answers
  • One of the most famous ___ licenses is gpl, which ensures that a particular program remains free to distribute and allows its co
    10·1 answer
  • Blogs are typically written by large companies or organizations as a way to express formal, technical, or scholarly information
    5·2 answers
  • Enter the number 2568 into the box below
    14·1 answer
  • Without a well-designed, accurate database, executives, managers, and others do not have access to the ____________________ they
    15·1 answer
  • Which of these sites would need additional investigation to check for reliability?
    8·2 answers
  • Similarites between hardware and software
    9·1 answer
  • What is a common translator?​
    9·1 answer
  • Define a function below, filter_out_strs, which takes a single argument of type list. Complete the function so that it returns a
    10·1 answer
  • Find the distance between the points.<br><br><br>(5,-2),(-6,-2)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!