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
cricket20 [7]
3 years ago
13

What will be displayed after the following code is executed? def pass_it(x, y): z = x*y result = get_result(z) return(result) de

f get_result(number): z = number + 2 return(z) num1 = 3 num2 = 4 answer = pass_it(num1, num2) print(answer)
Computers and Technology
1 answer:
Rus_ich [418]3 years ago
7 0

Answer:

The output of the following code is "14".  

Explanation:

In the python program firstly we define a function that is  pass_it() function. In this function, we pass the two variable that is x,y. Then we define two variable z and result in the function. The z variable is used to store the multiplication value of the x,y. In the result variable, we use another function that is get_result() function in this function we pass the value of the z variable as a parameter. This function adds a value that is 2 and returns its value. Then we declare a variable that is num1 and num2. In this variable, we assign value that is 3 and 4 and return value of the pass_it() function in the answer variable and print it.  

You might be interested in
Explain the working principle of computer with suitable diagram​
mylen [45]

Explanation:

<em>The</em><em> </em><em>working</em><em> </em><em>principle</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>computer</em><em> </em><em>system</em><em>. </em><em>Computer</em><em> </em><em>do</em><em> </em><em>the</em><em> </em><em>work</em><em> </em><em>primarily</em><em> </em><em>I</em><em> </em><em> </em><em>the</em><em> </em><em>machine</em><em> </em><em>and</em><em> </em><em>we</em><em> </em><em>can</em><em> </em><em> </em><em>not</em><em> </em><em>see</em><em>,</em><em> </em><em>a</em><em> </em><em>control</em><em> </em><em>center</em><em> </em><em>that</em><em> </em><em>converts</em><em> </em><em>the</em><em> </em><em>i</em><em> </em><em>formation</em><em> </em><em>data</em><em> </em><em>input</em><em> </em><em>to</em><em> </em><em>output</em><em>.</em><em> </em><em>A</em><em> </em><em>co.puter</em><em> </em><em>is</em><em> </em><em>a</em><em> </em><em>machine</em><em> </em><em>made</em><em> </em><em>up</em><em> </em><em>of</em><em> </em><em>parts</em><em> </em><em>for</em><em> </em><em>the</em><em> </em><em>hardware</em><em> </em><em>and</em><em> </em><em>software</em><em>.</em><em> </em><em> </em>

<em>I</em><em> </em><em>hope</em><em> </em><em>it</em><em> </em><em>will</em><em> </em><em>help</em><em> </em><em>you</em><em> </em><em>so</em><em>.</em><em> </em>

5 0
3 years ago
Write a program in which you input three numbers they canhave decimals so float values and the program gives you the minvalue ou
rosijanka [135]

Answer:

Following is the c++ code:-

#include <bits/stdc++.h>

using namespace std;

int main() {

   float a,b,c;//declaring three float variables..

   cout<<"enter values"<<endl;

   cin>>a>>b>>c;//taking input..

   float mi=min(a,b);//finding minimum in a and b..

   mi=min(mi,c);// finding minimum from mi and c.

   cout<<mi<<endl;//printing the answer.

return 0;

}

Explanation:

I have taken three float variables to hold the values.

then I am finding the minimum in a and b and storing it in mi.

Then finding minimum from mi and c so we will get our final minimum number.

6 0
3 years ago
Does anyone know how to write this right? This is for a coding class and I’m super confused on it.
vovangra [49]

Answer:

This is using c++ syntax, you might need to make slight adjustment for other languages.

First activity:

string firstSnack = "chips";

string secondSnack = "pizza";

string thirdSnack = "apples";

string bestSnack =  firstSnack;

bestSnack = secondSnack;

Second activity:

double apple = 0.5;

double banana = 0.75;

double orange = 1.43;

double total = apple + banana + orange;

Explanation:

When first declaring a variable, you want to specify the type (such as int, double, string, bool, etc.) and then the name. You can set the variable value in the declaration, or you can set it to a value later in the program by not having the equals sign and whatever comes next.

4 0
3 years ago
Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
Vlada [557]

Explanation:

The argument is for the right braces.The right braces are used for simplicity.The right brace always terminates a block of code or a function.

The argument against right brace is that when we see a right brace in a program,we are not obvious about the location of the corresponding left brace because all or multiple  statement end with a right brace.

7 0
3 years ago
The graphical user interface (GUI) was pioneered in the mid-1970s by researchers at:
olasank [31]
IBM is the correct answer
5 0
3 years ago
Read 2 more answers
Other questions:
  • Add a checkbox associated with each label. The first checkbox should have name and id of "likeCats" and be initially checked. Th
    5·1 answer
  • Which option enables you to keep the last grammatical change
    15·2 answers
  • Which do switches create?<br> Networks<br> Wireless access points<br> Routes<br> Collision domains
    12·1 answer
  • WHAT DOES THE WORD MONOCHROME MEAN?
    11·1 answer
  • A cell reference with only one dollar sign before either the column or the row is called an absolute reference.
    10·1 answer
  • Which of the following is the general term used to describe software code that isdesigned to cause damage to a computer system?
    10·1 answer
  • Select the correct answer.
    5·1 answer
  • Explain why it is wise to remember your social security number
    15·2 answers
  • Which of these did the author use to create certain moods?
    6·1 answer
  • How can you prevent someone with access to a mobile phone from circumventing access controls for the entire device
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!