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]
3 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]3 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
Which design principle is the subject of a photo or image?
MakcuM [25]

Answer:

B) Framing is the answer to your question

8 0
3 years ago
Why do companies implement new technology?Select all that apply.
Wittaler [7]
All of them are correct except the last one
6 0
3 years ago
Why is it important to place the sheave wheel in exactly the right place on the head frame?
lord [1]

I guess because these cables are hooked up to a elevate that transport miners, machines and ore into and out of the mine.

7 0
3 years ago
Which of the following is not a type of computer network
laila [671]
The answer is City Area Network.
Local Area Network, Metropolitan Network, and Wide Area Network are only some of the types of network. LAN is a network of computers in a single site usually in a single office building. While MAN, is a network of computer across an entire city or a small region. WAN is a very large area of network such as the Internet.
8 0
3 years ago
How to save pictures on a chromebook without right-click
grin007 [14]

screen shot is easier

4 0
3 years ago
Other questions:
  • Într-o școală sunt n clase, fiecare având un număr diferit de elevi. Școală primește m pachete cu cărți, fiecare cu un număr dif
    15·1 answer
  • Which method of encryption is based on physics principles?
    5·1 answer
  • True or false? the name of a named standard acl is case sensitive.
    6·1 answer
  • Which of the following statements is true?
    14·1 answer
  • The following program contains 6 errors. Correct the errors and submit a working version of the program. The corrected version o
    13·1 answer
  • IPv6 enables hosts to generate their own IPv6 addresses without the need for a DHCPv6 server. This is referred to as stateless a
    7·1 answer
  • Which quality allows programmers to modify a program as and when required
    11·2 answers
  • Three popular types of ____ are handheld computers, PDAs, smart phones.
    13·1 answer
  • How will you configure those computer hardware peripherals​
    10·1 answer
  • When designing a laptop, which three things should designers think about?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!