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
aleksley [76]
3 years ago
7

Call your function from Example 1 three times with different kinds of arguments: a value, a variable, and an expression. Identif

y which kind of argument is which.
Computers and Technology
1 answer:
Blizzard [7]3 years ago
8 0

Answer:

Example 1:

def function(num):  

   print(num*2)

Example 2:

function(5)

num = 2

function(num)

function(3-1)

Explanation:

Given:

See attachment for complete question

To start with Example (1)

def function(num):  

   print(num*2)

<em>Note that; the above code segment which doubles the parameter, num could have been any other code</em>

<em />

<em>In Example (1), the parameter is num</em>

For example (2):

We can call the function using:

#1. A value:

function(5)

<em>In #1, the argument is 5; a value</em>

#2. A Variable

num = 2

function(num)

<em>In #2, the argument is num; a variable</em>

#3. An Expression

function(3-1)

<em>In #3, the argument is 3-1; an expression</em>

You might be interested in
I need to create a method named "root positive". which will either print the square root of the number passed to it or if the nu
rjkz [21]

Answer:

Explanation:

The following code is written in Java. It is a method that calculates the square root of a number as requested. The method first checks with an IF statement if the parameter value is a positive number and then calculates the square root and prints it to the screen. Otherwise, it prints Number must not be negative. A test case has been provided in the main method and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter a number of type double to calculate square root:");

       double num = in.nextDouble();

       rootPositive(num);

   }

   public static void rootPositive(double num) {

       if (num > 0) {

           System.out.println(Math.sqrt(num));

       } else {

           System.out.println("Number must not be negative.");

       }

   }

}

5 0
3 years ago
You can copy a selected shape by holding down the ____ key and then dragging the shape.
marshall27 [118]

Answer:

Option A is the correct choice answer for the above question.

Explanation:

In an MS-Powerpoint document, when a user wants to copy the selected shape and drag that shape for use in slides then he needs to--

  1. Select the shape
  2. Press the Ctrl key and
  3. drag that shape on the slide of the powerpoint.

Then the user gets the shape on the slide for their personal use.

The question scenario also suggests the same which is described above. hence Option A is the correct answer while the other is not because--

  • Option B suggests 'ESC' which is used to escape any running program.
  • Option C suggests about ALT key which is of no use for the MS-Powerpoint document.
  • Option D suggests about TAB key which is used to make the space between two texts or diagram.
5 0
2 years ago
Read 2 more answers
What is a computer that provides services and connections to other computers on a network is called a ________ ?
melisa1 [442]
They are called servers .. you can also call them hosts
6 0
3 years ago
I’m confused what any of this means can anyone help?
raketka [301]
The answer will be
97
98
96
194
5 0
3 years ago
How to get the blade out of a pencil sharpener?
agasfer [191]
Poke hole with thin but strong object
Or buy new sharpener
7 0
3 years ago
Other questions:
  • Write the importance of cyber law? In point .<br>​
    10·2 answers
  • What is the best way to protect computer equipment from damage caused by electrical spikes?
    9·2 answers
  • What is the use of pecil icon
    11·2 answers
  • Why are you unable to modify the budget file, when you have the allow full control ntfs permission?
    5·1 answer
  • When a partition is formatted with a file system and assigned a drive letter it is called a volume?
    10·1 answer
  • My messaging system is messed up. It keeps saying I'm getting messages but then it says nothing new in my inbox. I'm confused- H
    15·2 answers
  • A file manager is used for all of the following except ____.
    12·1 answer
  • DUE SOON NEED HELP FAST!!
    11·1 answer
  • I WILL MARK IT BRAINLIEST FOR SURE ☺️❤️
    13·1 answer
  • By default word documents include _______ margins on all sides of the document.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!