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
One gigabyte can be expressed as: a.) 1,000 kilobytes b.) 1,000 bytes c.) 80,000 kilobytes d.) 1,000 megabytes e.) 8,000 bits
Molodets [167]
The answer is d. 1000 megabytes
8 0
3 years ago
An icon in a document preset that looks like the play button on a YT video, what type of document is the preset meant to be used
zloy xaker [14]
The answer is film and video
8 0
3 years ago
Read 2 more answers
Which of the following is not a method for opening Word software?
timofeeve [1]

Answer:

right clicking on the desktop and selecting "view"

Explanation:

Some of the methods for opening Microsoft Word software include;

using the Ms. Word icon on the task-bar

searching for the Ms. Word program if you are using the Widows operating system

using the Ms. Word icon on the desktop

On the other hand, right clicking on the desktop and selecting "view" is a procedure for changing icon settings on desktop,

8 0
3 years ago
Read 2 more answers
A device that makes it possible for multiple customers to share one address is called a/n _____.
Debora [2.8K]
When you use the word "address", I assume you are referring to an external address, in which case the answer is NAT (network address translation). Essentially, network address translation converts LAN IP addresses (local IP addresses) to WAN  IP addresses (external IP addresses). So for instance: everyone in my home accesses the internet under our network's external IP address. Inside our network, we have local IP addresses, which allow for packets to be routed to our individual machines wirelessly. So let's say my IP address on the LAN is 192.168.1.4, and I want to access brianly.com. My router performs NAT by converting my local IP to an external one which can be used for accessing the web. Then when data comes back to the network from brainly's server, my router once again performs NAT to convert between my external IP to my local IP, so that my router knows where the data needs to be routed to on the LAN.
6 0
3 years ago
In Linux, when logged in as a normal user with root privileges, which command must precede the apt-get command in the command li
siniylev [52]

Answer:

"sudo" is the command to get super user or root privileges in linux.

Explanation:

in order to install package with root privilege in linux, the command would be

sudo apt-get install <package name>

8 0
3 years ago
Other questions:
  • Ana works in the medical records department at a large medical office. Her job includes scanning and uploading medical records i
    15·1 answer
  • Write a C++ program that searches for anagrams in a dictionary. An anagram is a word obtained by scrambling the letters of some
    5·1 answer
  • Which of the following would be a considered a want rather than a need for most people?
    15·1 answer
  • An OS X backup utility that automatically backs up files to a dedicated drive that is always available when the computer is turn
    6·1 answer
  • Erica is CEO of a company and has recently hired a vice president of marketing. She would like to share this information with al
    13·2 answers
  • 11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
    6·1 answer
  • What is the color difference between the iMac and iMac Pro
    14·2 answers
  • Which weakness of web sites to launch attacks does an sql injection technique exploit?
    15·1 answer
  • Is there any difference beetween the old version of spyro released on the origional and the newer ones??? or is it only change i
    8·1 answer
  • What is computer specification
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!