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
The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision.
Aneli [31]

Answer:

TAX_RATE = 0.20

STANDART_DEDUCTION = 10000.0

DEPENDENT_DEDUCTION = 3000.0

gross_income = float(input("Enter the gross income: "))

number_of_dependents = int(input("Enter the number of dependents: "))

income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents)

tax = income * TAX_RATE

print ("The income tax is $" + str(round(tax, 2)))

Explanation:

Define the <em>constants</em>

Ask user to enter the <em>gross income</em> and <em>number of dependents</em>

Calculate the <em>income</em> using formula (income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents))

Calculate the <em>tax</em>

Print the <em>tax</em>

<em />

round(number, number of digits) -> This is the general usage of the <em>round</em> function in Python.

Since we need <u>two digits of precision</u>, we need to modify the program as str(<u>round(incomeTax, 2</u>)).

4 0
3 years ago
If you are trying move a hard drive from a non-working computer to a working computer for the purposes of accessing the data on
Llana [10]
You must have an administrator password before you can access the drive <span />
5 0
3 years ago
X = 1 if (A = 1 OR B = 1) OR (A = 0 AND B = 1
Gnoma [55]

Answer:

For question a, it simplifies.  If you re-express it in boolean algebra, you get:

(a + b) + (!a + b)

= a + !a + b

= b

So you can simplify that circuit to just:

x = 1 if b = 1

(edit: or rather, x = b)

For question b, let's try it:

(!a!b)(!b + c)

= !a!b + !a!bc

= !a!b(1 + c)

= !a!b

So that one can be simplified to

a = 0 and b = 0

I have no good means of drawing them here, but hopefully the simplification helped!

4 0
2 years ago
The hardware and software that must be implemented to support the applications that the primary activities use are a part of the
Contact [7]
The answer is infrastructure
7 0
2 years ago
Your bank offers to lend you $114,400 at an 8.5% annual interest rate to start your new business. The terms require you to amort
wlad13 [49]

Answer: The amount of interest to be paid is $972

Explanation: This is gotten by firstly getting the amount of money to return per year without the interest which is $114400/10(years)= 11440

11440 is to be paid per year without interest. To get amount of interest is $11440*8.5/100 = $972 this is the amount of interest to be paid per year including in year 2.

Therefore, total amount of money together with interest to be paid each year and in year 2 = $11440+$972=12412.

3 0
3 years ago
Other questions:
  • How many people watch Anime in the world?
    15·2 answers
  • Security and protection as it relates to operating systems is grouped into four categories: Availability, Data integrity, Authen
    9·1 answer
  • Charlie is taking his slide presentation to a meeting at a remote location. He saves his presentation as a package on a CD. Char
    15·2 answers
  • Ricardo twists his ankle at work but does not immediately realize that he is injured because his ankle is not sore or swollen, a
    5·1 answer
  • All states that have altered judicial selection techniques in recent years have adopted some form of:
    5·1 answer
  • Write a program that allows the user to enter a time in seconds and then outputs how far an object would drop if it is in free f
    7·1 answer
  • , 13 dB correspond to a power ratio of ....?
    14·1 answer
  • Window frame will expand to fill the entire desktop when you
    12·1 answer
  • What are your considerations in making a derivative ict content ti effectively communicate or present data or information?
    11·1 answer
  • Write A Code In Python
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!