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 type of software-generated problems can indicate that a software bug is causing a memory error?
Katena32 [7]
The type of software-generated problems that can indicate that a software bug is causing a memory error are page fault, exception error and general-protection fault. Registry errors show that there are parts of the registry that were written to the faulty parts of the RAM. An erroneous memory count would happen when there is incompatibility in the installation.
3 0
3 years ago
According to the author. Consider diverse and various domains of programming languages and applications.
elixir [45]

Answer:

A system programming language has low - level features that allow a software interface to write in an external device. Some computer uses computer languages such as PL/S, PL/I. This is an example of System Programming or Language programming.

Explanation:

The system language is a language used for system programming such as writing system software, which requires different development approaches when compared with application software.

System programming is the activity of the computer system. The characteristic of system programming when application programming produces software is that application that provides services to create software platforms.                    

                     

5 0
3 years ago
Where can I learn how you hack?​
morpeh [17]

Answer:

www.udemy.com

5 0
2 years ago
Read 2 more answers
Name the major types of computer systems from slowest to fastest. ​
Vadim26 [7]

Answer:

Cache is the fastest and most expensive, RAM is slower and less expensive, and virtual memory is the slowest and least expensive type.

Explanation:

3 0
2 years ago
Write code which takes a user input of a String and an integer. The code should print each letter of the String the number of ti
Alexus [3.1K]

import java.util.Scanner;

public class JavaApplication70 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Input a String:");

       String txt = scan.nextLine();

       System.out.println("Input an integer:");

       int num = scan.nextInt();

       String newTxt = "";

       int w = 0;

       for (int i = txt.length()-1; i >= 0; i--){

           char c = txt.charAt(i);

           while (w < num){

               newTxt += c;

               w++;

           }

           w = 0;

       }

       System.out.println(newTxt);

   }

   

}

I hope this helps!

7 0
3 years ago
Read 2 more answers
Other questions:
  • To display or distribute information from a database, programmers or database administrators create ___ .
    12·1 answer
  • It is okay to use a dust rag when cleaning the inside of a computer.
    9·2 answers
  • What is Mainframe computer​
    15·1 answer
  • How is a technical certificate like a computer-related associate degree?
    12·2 answers
  • I am buying a BluRay drive access time is 180ms and the other is 210ms(BD-ROM) whats does access time mean
    5·1 answer
  • All of the following are helpful tips for protecting your digital privacy, except:
    10·2 answers
  • Paths describe the location of folders and files on your computer. If you have saved your work to c:\documents, then your work h
    12·1 answer
  • At which track meet did two runners finish in a time equivalent to the mode?
    14·1 answer
  • Which one is better AMD Ryzen 5 Or Nvidia Gtx 2080 ti
    6·1 answer
  • Después de un incidente de seguridad del cliente, el equipo realiza un análisis en profundidad de cada paso dado por los atacant
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!