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
Sindrei [870]
2 years ago
8

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.
Sample output with two calls to get_user_num() and one call to compute_avg():

FIXME: Finish get_user_num()

FIXME: Finish get_user_num()

FIXME: Finish compute_avg()

Avg: -1


code to fill in:


''' Your solution goes here '''


user_num1 = 0

user_num2 = 0

avg_result = 0


user_num1 = get_user_num()

user_num2 = get_user_num()

avg_result = compute_avg(user_num1, user_num2)


print('Avg:', avg_result)
Computers and Technology
1 answer:
elena-14-01-66 [18.8K]2 years ago
4 0

Answer:

Replace your solution goes here with the following:

def compute_avg(num1, num2):

   func_name = "compute_avg()"

   print("FIXME: "+func_name)

   return -1

def get_user_num(user_num):

   func_name = "get_user_num()"

   print("FIXME: "+func_name)  

   return -1  

Explanation:

This defines the compute_avg function

def compute_avg(num1, num2):

This sets the function name

   func_name = "compute_avg()"

This prints the required output

   print("FIXME: "+func_name)

This returns -1

   return -1

This defines the get_user function

def get_user_num(user_num):

This sets the function name

   func_name = "get_user_num()"

This prints the required output

   print("FIXME: "+func_name)

This returns -1  

   return -1  

You might be interested in
one data is in memory the computer interpets and executeinstructions to process the data into informationA. TrueB. False
lidiya [134]

Answer:

Option A is the correct answer for the above question.

Explanation:

  • The computer is a system that processes the data to produce information. For any computer system when the data is processed then it will form the information.
  • The user gives some instruction to process that can also be called the program. Then the computer takes the instruction and processes the data on behalf of the instruction and for the information because in any system when data is processed it can form the information.
  • The above question says that the computer follows the instruction to process the data to produce the information which is correct as described above. Hence True is the correct answer to the above question.
4 0
3 years ago
The implementation stage of the SDLC _____.
Karolina [17]

Answer:

d. involves analyzing end-user business requirements in order to refine project goals

Explanation:

In the software development life cycle, the implementation stage is the stage where the computer programmers begin the actual coding of the application required by the end-user. At this stage, the developer takes into account the needs and specifications of the customer.

For example, if the end-user wants a software application that can track payment records, the researcher at this stage begins using the right software to code programs that can effect this function.

6 0
2 years ago
True or false
Semmy [17]
It’s false I hope this helped you
3 0
3 years ago
Which of the following did you include in your notes?
iVinArrow [24]

Answer:

How you will be innovative in what you offer

Explanation:

personally I think all 3 but it is what it is

6 0
2 years ago
John is an entrepreneur who plans to enter a franchise contract with a hotel business. Which of these is an advantage that John
ladessa [460]

The answer is C:

In most Franchise businesses, the franchisor provides ongoing guidance and support, and a developed way of doing business. In addition, they offer a higher rate of success as compared to start-up businesses and you may find it easier to secure finances for a franchise. You will get all the benefits that are attached with big businesses for a small business ownership.

3 0
3 years ago
Read 2 more answers
Other questions:
  • In this problem we consider sending real-time voice from Host A to Host B over a packet-switched network (VoIP). Host A converts
    12·1 answer
  • Typically, a CLEP exam is taken by students who
    8·1 answer
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    13·1 answer
  • What is a VIN and what role does it play during a criminal investigation? Explain how a VIN could help in a bomb and/or arson ca
    12·1 answer
  • Read the following sentence from an argumentative essay.
    11·1 answer
  • Host Y sends the first TCP ACK message for the transaction?<br><br> a. true<br><br> b. false
    9·1 answer
  • What is an "immediate preemptive scheduler"?
    15·1 answer
  • WILL MARK BRAINLIEST!!!!!!!!!!!
    6·2 answers
  • Basil was reading about a new attack that forces the system to abandon a higher cryptographic security mode of operation and ins
    10·1 answer
  • The first time that a particular visitor loads a web site page is called a(n) _____.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!