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
larisa [96]
2 years ago
13

% Do not modify CalculateSum function maxSum = CalculateSum(userNum1, userNum2, userNum3) maxSum = MaxValue(userNum1, userNum2)

+ userNum3; end % Define a function MaxValue that returns the largest input value % Function inputs: numA, numB % Function output: maxNum % function maxNum ...
Computers and Technology
1 answer:
sergeinik [125]2 years ago
6 0

Answer:

The function in Python is as follows:

def MaxValue(userNum1, userNum2):

   if userNum2>userNum1:

       return userNum2

   else:

       return userNum1

Explanation:

This defines the function

def MaxValue(userNum1, userNum2):

This returns userNum2 if userNum2 is greater than userNum1

<em>    if userNum2>userNum1:</em>

<em>        return userNum2</em>

If otherwise, this returns userNum1

<em>    else:</em>

<em>        return userNum1</em>

<em />

You might be interested in
Give an example of a process that may need a flowchart to clarify procedures.<br><br> HELP ASAP!
11111nata11111 [884]

To understand flow of programming logic flow chat technique been used. Once end user starts any learning programming flow chat design been learned and corrected the mistake. After success of flow chat design end user been advice to do programming and tested in computer.

<u>Explanation:</u>

In flow chart design is used for beginner level programming. Some time to make higher level managers to understand this flow chart design is used.

Flow chart has start, procedure, condition, function or procedure and end with stop diagrams.

Flow chart makes end user understand the flow of logics.

Suppose we need to do a process for a procedure, end user has to design with start flow chart symbol and put a procedure flow chart symbol with identification character, then end user has use same identification character and start designing the procedure in the flow chart diagram.

Procedure in flow char design is used to call same procedure number of time, so that repeated coding is avoided.

5 0
3 years ago
A driving school uses this rule to estimate how many lessons a learner will require.
HACTEHA [7]

Answer:

This is correct. And to remove the confusion, I am adding the meaning of the Pseudocode. You need to begin with the algo that you are working upon, and then you need it to phrase the algo with the words which are easy to be transcribed in the form of the computer instructions. Now you need to indent the instructions properly inside the loop or within the conditional clauses. And while doing this, you need to not use the words which are used in certain forms of computer language. However, IF and THEN and ELSE and ENDIF are very frequently used as pseudo-code. Hence, your answer is correct.

Explanation:

Please check the answer section.

8 0
2 years ago
What animal is perry the platypus ​
valkas [14]

Answer: Agent P or simply Perry

Explanation:

4 0
3 years ago
Read 2 more answers
Consider tree from the lectures on slide 10, write down the nodes in order as pro-
Leto [7]
The work same to be level order traverse and the sea is completely
7 0
3 years ago
Write a loop that sets newScores to oldScores shifted once left, with element 0 copied to the end. Ex: If oldScores = {10, 20, 3
Anarel [89]

Answer:

The code to this question can be given as:

Code:

int lastVector = newScores.size() -1; //define variable lastVector that holds updated size of newScores.

newScores = oldScores; //holds value.

for (i = 0; i < SCORES_SIZE - 1; i++) //define loop.

{  

newScores.at(i) = newScores.at(i+1); //holds value in newScores.

}

newScores.at(lastVector) = oldScores.at(0); //moving first element in last.

Explanation:

  • In the given C++ program there are two vector array is defined that are "oldScores and newScores". The oldScores array holds elements that are "10, 20, 30, 40".
  • In the above code, we remove the array element at first position and add it to the last position. To this process, an integer variable "lastVector" is defined.  
  • This variable holds the size of the newScores variable and uses and assigns all vector array elements from oldScores to newScores. In the loop, we use the at function the removes element form first position and add in the last position.
  • Then we use another for loop for print newScores array elements.  
4 0
3 years ago
Other questions:
  • Besides technical skill, what is the most important factor for staying employed and being offered promotions?
    6·2 answers
  • Instructions Write a program that asks the user for a number. If the number is between 1 and 255, the program outputs the corres
    15·1 answer
  • What does the Additional Clock tab do?
    11·1 answer
  • Imagine you are building an ATM system; list at least 6 application domains for the system. That is, in which context is the sys
    13·1 answer
  • Define Indentation
    8·1 answer
  • You are going to create an Arduino sketch where you have two push buttons, one piezo, one
    10·1 answer
  • Which of the following is the file type of Microsoft® Publisher files?
    12·2 answers
  • Which of the following is not an advanced strategy you may use to help you conduct a search on the Internet?
    15·2 answers
  • How has 5G become more energy efficient?
    14·1 answer
  • a printer's accessory list includes a maintenance kit with a variety of replaceable parts you should install after 100,000 pages
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!