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
Molodets [167]
3 years ago
6

Define stubs for the functions get_user_num() and compute_avg(). Each stub should print "FIXME: Finish function_name()" followed

by a newline, and should return -1. Each stub must also contain the function's parameters.
Computers and Technology
1 answer:
katovenus [111]3 years ago
6 0

Answer:

Following are the code to this question:

def get_user_num():#defining a method

   return -1#return value -1

def compute_avg(n1, n2):#defining method compute_avg that accepts two parameters  

   return -1#return value -1

user_num1 = user_num2= get_user_num()#defining user_num1 and user_num2 variable that calls method get_user_num

avg_result = compute_avg(user_num1, user_num2)#defining avg_result that calls compute_avg method and store its value

print('The average value is:', avg_result)#use print method to call avg_result

Output:

The average value is: -1

Explanation:

In the given python code,  two methods "get_user_num and compute_avg" is defined, in which the second method "compute_avg" accepts two parameters that are "n1 and n2", and both methods will return its value, that is "-1".

In the next step, "user_num1 and user_num2" is defined, that calls method "get_user_num" and stores its value, and the variable avg_result is defined, which calls the "compute_avg" method and stores its value and use the print method is defined, that calls its value.

You might be interested in
Stress is an illness not unlike cancer.<br> True<br> False
LiRa [457]

Answer:

... not unlike cancer.

Explanation:

so we have a double negative so it makes it a positive, so that would basically mean like cancer

so false i think

8 0
3 years ago
Read 2 more answers
You are creating a presentation and you have come to the last slide. you still have more information to add. what should you do?
ohaa [14]
If you are using Google Slides, Click the plus arrow in the top left hand corner of the webpage. That will add another slide to the presentation you are working on
7 0
3 years ago
Read 2 more answers
Shelby likes to play video games on an old Atari video game system. No matter how old the cartridge, when she inserts it into th
Nady [450]

Answer:

ROM (Acronym of Read-only memory. (video games))

Explanation:

7 0
3 years ago
Read 2 more answers
What is the easiest way of ensuring that others can access a presentation that a user has created and make changes to it, while
Yakvenalex [24]

Answer:

You can share the presentation with your group. Share the presentation with everyone by email so everyone can work on it at once. Give your group members their own part to work on.

Explanation:

4 0
4 years ago
What is the best stratiget to avoid paying intrest in your credit cared
pochemuha
Paying it in full month over month.
4 0
3 years ago
Other questions:
  • You discover memory is corrupted, what would be an indication of a software vs. a hardware issue?
    5·1 answer
  • The most commonly used software in the school systems that include word processor, spreadsheet, database management system, and
    6·1 answer
  • A new company will have 40 workstations in one building sharing a single network. All users must be able to share files and prin
    9·1 answer
  • You have just installed a new sound card in your system, and Windows says the card installed with no errors. When you plug up th
    5·1 answer
  • If you reformat the hard drive on a computer, it erases all personal information from your computer and makes it safe to donate.
    6·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    14·1 answer
  • 1.
    15·1 answer
  • I've been stuck on these two basic javascript assignments for an embarrassingly long time. The teacher refuses to help me and th
    13·1 answer
  • The. Model has the disadvantage of high project cost due to creation several prototypes
    6·1 answer
  • Pictures in the _____ gallery give the appearance of a physical object, such as water drops or sand, that can give your presenta
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!