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
Aleonysh [2.5K]
2 years ago
10

How do I use files and functions in programming?

Computers and Technology
1 answer:
maw [93]2 years ago
3 0

answer:

1.The program comes to a line of code containing a "function call".

2.The program enters the function (starts at the first line in the function code).

3.All instructions inside of the function are executed from top to bottom.

4.The program leaves the function and goes back to where it started from.

5.Any data computed and RETURNED by the function is used in place of the function in the original line of code.

You might be interested in
1. Grade data is:
horrorfan [7]

Answer:

1.)

import math

def min_max(lst):

   minimum = math.inf

   maximum = -math.inf

   for x in lst:

       if minimum > x:

           minimum = x

       elif maximum < x:

           maximum = x

   return minimum, maximum

2.)

def deltaGrade(lst):

   sm = 0  #sm is sum

   for x in lst:

       sm += x

   mean = sm/len(lst)

   deltaG = 75 - mean

   return deltaG

7 0
3 years ago
Modify the code below to do the following:
Kitty [74]

Answer:

The code is appropriately given below with comments for better understanding

Explanation:

#include <linux/init.h>

#include <linux/module.h>

#include <linux/kernel.h>

#include <linux/hash.h>

#include <linux/gcd.h>

#include <asm/param.h>

#include <linux/jiffies.h>

/* This function is called when the module is loaded. */

static int simple_init(void)

{

  printk(KERN_INFO "Loading Module\n");

  printk(KERN_INFO "These are the HZ: %d\n", HZ);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

  printk(KERN_INFO "Golden Ratio is: %lu\n", GOLDEN_RATIO_PRIME);  

  return 0;

}

/* This function is called when the module is removed. */

static void simple_exit(void) {

  printk(KERN_INFO "Removing Module");

  unsigned long a = gcd(3300, 24);

  printk(KERN_INFO "Greatest Common Denominator between 3,300 and 24 is: %lu\n", a);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

}

/* Macros for registering module entry and exit points. */

module_init( simple_init );

module_exit( simple_exit );

MODULE_LICENSE("GPL");

MODULE_DESCRIPTION("Simple Module");

MODULE_AUTHOR("SGG");

7 0
3 years ago
Windows, Apple’s Mac OS, and Unix/Linux are just some of the most common what?
34kurt
Most common PC operating systems
7 0
3 years ago
Read 2 more answers
Describe how you believe technology will impact our society in 50 years.
N76 [4]

Answer:

Wall-e

Explanation:

We will all be fat, lazy, on floating chairs with everything in our lives being automated thanks to AI and everyone's obsession to do less.

5 0
2 years ago
When an employee is told that his job will be outsourced within a year, he knows that his job will become unnecessary
Anvisha [2.4K]
False!! Hope this helps
8 0
2 years ago
Other questions:
  • The following declaration appears in a program: short totalPay, basePay = 500, bonus = 1000; The following statement appears in
    9·1 answer
  • I want to work on cloud computing and i need some help on how to start ?
    6·1 answer
  • How do you get 99 points on sunny meadows simulation?
    6·2 answers
  • After the following code runs, what will be the value of result? var x = 30; function get () { return x; } function set (value)
    10·1 answer
  • What is the formula equivalent to the function =SUM(B1:B5)? A. =B1+B5 B. =$B$1+$B$5 C. =B1+B2+B3+B4+B5 D. =$B$1+$B$2+$B$3+$B$4+$
    7·1 answer
  • To what are multiple servers arranged in racks related
    14·2 answers
  • Which line of code outputs the decimal portion of a float stored in the variable x? print (x % 1000) print (x) O print (x / 1000
    13·1 answer
  • In a relational database, the three basic operations used to develop useful sets of data are:_________.
    14·1 answer
  • Application of computer in insurance​
    14·1 answer
  • what component of virtualization controls all physical memory, and thus has the ability to make any unused memory pages in each
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!