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
Marina86 [1]
2 years ago
7

What is output by the following program?

Computers and Technology
1 answer:
zubka84 [21]2 years ago
8 0

The output of the program is 10.

def mult(a, b = 1, c = 1):

    print(a * b * c)

mult(2, 5)

<h3>Code explanation:</h3>

The code is written in python.

  • A function is declared named "multi" and the function has parameter of a, b and c. The default value of b and c are 1.
  • Locally, we print the product of a, b and c.
  • Finally, we call the function with its inputted parameters. Notice we only had 2 argument while calling the function. This simply implies that the default value for c is used. Therefore,  we will have 2 × 5 × 1 = 10

learn more on python here: brainly.com/question/22796383

You might be interested in
Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
stira [4]

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

// function to calculate cost

double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon){

  double cost;

  //Expression to compute cost

  cost = drivenMiles / milesPerGallon * dollarsPerGallon;

  return cost;

}

// main function

int main()

{

   double drivenMiles, milesPerGallon, dollarsPerGallon;

  //initialise the variables

  drivenMiles = 50;

  milesPerGallon = 20.0;

  dollarsPerGallon = 3.1599;

  //Call function

  double cost = DrivingCost(drivenMiles,milesPerGallon,dollarsPerGallon);

  //Display result

  cout<<"Driven miles : "<<drivenMiles<<endl;

  cout<<"Miles per Gallon : "<<milesPerGallon<<endl;

  cout<<"Dollars per Gallon : "<<dollarsPerGallon<<endl;

  cout << fixed << setprecision(2);

  cout<<"The total driving cost : "<<cost ;

  return 0;

}

Explanation:

Declare and initialize drivenMiles with 50, milesPerGallon with 20.0 and dollarsPerGallon with 3.1599.Call the function DrivingCost() with these parameters,This will calculate the cost and return the value.Print the result after getting the cost.Similarly we can calculate cost for drivenMiles equals to 10 and 400 miles also.

Output:

Driven miles : 50

Miles per Gallon : 20

Dollars per Gallon : 3.1599

The total driving cost : 7.90

5 0
3 years ago
Which server-based authentication protocol would be best for an organization that wants to apply authorization policies on a per
BARSIC [14]

Answer:

TACACS+

Explanation:

TACACS+ or terminal access controller access-control system plus is an open standard protocol developed by Cisco. It encrypts all communication in a network ( including the password and data sent) and supports a separate authentication, authorisation and accounting policies for access to a centralised database.

It also uses the transport layer protocol TCP for a reliable data communication.

6 0
4 years ago
Need help fast this is do a 4
Stells [14]

Answer:

I believe the answer is B.

8 0
3 years ago
Localize the software problem and describe it<br>​
sweet [91]

Answer:

Do you have any idea how to get the best and most importantly I

5 0
3 years ago
My desktop has problems; my icons, taskbar, and background are missing. I always have to use task manager to refix it every time
skad [1K]
Maybe restart your computer?
4 0
3 years ago
Other questions:
  • If you delete a view, account administrators can recover the view using the "trash can" function within how many days?
    7·2 answers
  • When should an individual consider entering parenthood?
    5·1 answer
  • (The Location class) Design a class named Location for locating a maximal value and its location in a two-dimensional array. The
    10·1 answer
  • Which of the following statements about functional programming languages is incorrect?A) In pure functional programming, there a
    5·1 answer
  • Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out t
    9·1 answer
  • I am on windows 10 OS. I have been trying to figure this out for ages! I want to get my task bar (on the bottom of the screen) t
    14·2 answers
  • MAN speeds are faster than WAN speeds because of ________. technological limitations regulatory limitations
    6·1 answer
  • When should a computer definitely have an ip address
    15·2 answers
  • Which country has the most common features of analogue and digital computer​
    6·1 answer
  • Please help me answer this question
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!