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
mote1985 [20]
4 years ago
13

Write a function named "sum_values" that takes a list as a parameter and returns the sum of the values at indices 9, 8, and 11.

You may assume the input will be large enough to have values at all these indices
Computers and Technology
1 answer:
Svet_ta [14]4 years ago
3 0

Answer:

def sum_values(mylist):

 sumSomeNumbers = mylist[9]+mylist[8]+mylist[11]

 print(sumSomeNumbers)

Explanation:

Using python programming language;

A function is created called sum_values that accepts one parameter

Withing the function body, a variable called sumSomeNumbers is created to hold the sum of the elements at index 9,8 and 11

Finally a print Statement is used to output sumSomeNumbers

When the function is called It is passed a list as argument and it will display the sum of the three numbers at that indices

for example:

lst = [23,3,4,5,6,63,2,3,5,6,5,5,7,89]

sum_values(lst)

Outputs 16

You might be interested in
Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile >> x >> y;
harina [27]

Answer:

The answer to this question is the option "a".

The statement for opening file can be given as:  

inFile.open("progdata.dat");

Explanation:

In the above statement, this statement is part of the c++ programming language. To open any file we use the following syntax that can be given as:

Syntax:

inFile.open(filename, mode);

In the above syntax inFile.open() is a function that opens the file. In this function, we pass two parameters that are filename, mode. Where filename is the name of the file which we want to open. In the filename, we write file names with the path of the file like(C:\Users\Public\Music\Sample Music\abc.dat) where (C:\Users\Public\Music\Sample Music) is the path of the file and (abc.dat) is a file name. In the mode parameter, it provides the mode in which we want to open a file. There are two types of read mode and write mode. The default mode is read mode.

3 0
3 years ago
(5 pt.) The name of a variable in the C programming language is a string that can contain uppercase letters, lowercase letters,
lilavasa [31]

Answer:

The different variable in C is 21213316700.

Explanation:

Given value:

Total value  = letters + underscore value

Total value  = 52 + 1

Total value =53

choice for first character = 53 letters +10 digits

first character = 63

choice for remaining characters

So,

Variable number With one 1 character = 53

Variable number With 2 character  = 53 × 63

Variable number With 3 character = 53 × 63²

Variable number With 4 character  = 53 × 63³

.

.

.

Variable number With 7 character  = 53 \times  63^{7}

Total difference variable = 53 + 53 × 63+ 53 × 63²+ 53 × 63³+....+ 63^{7}

Total difference variable = 53(1 + 63 + 63²+ 63³+ .... + 63^{7})

Formula:

1+x+x^2+x^3+x^4+........x^n\\\\\Rightarrow  \frac{x^{(n+1)} -1}{x-1}

Total difference variable

53 \times \frac{63^{7+1} -1 }{63-1}\\\\53 \times \frac{63^{8} -1 }{63-1} \\\\ \therefore 63^8 = 2.48 \times 10^{14}\\\\53 \times \frac{2.48 \times 10^{14} -1  }{62}\\\\53 \times \frac{1.48 \times 10^{14}}{62}\\\\21213316700

6 0
4 years ago
Your ___ can provide hardware firewall protection for your home network where it connects to the ISP's network, just as ISP netw
zalisa [80]

Answer:

router.

Explanation:

Router is the main connection for a house network to the Internet, the firewall function is combined to the router. Every house network must have a firewall to protect their privacy.

The router provides the hardware firewall while the windows provides the software firewall.So the answer to this question is router.

5 0
3 years ago
A _______ is a host that runs software to provide information, such as web content, to other hosts.
kolezko [41]

Answer:

The correct answer to the following question will be "Server".

Explanation:

  • Any device with a network connection is a host, but only hosts which accept other device connections (climates) are Servers.
  • All servers were hosts, but the servers aren't all hosts.
  • Each host network is a node, however not all network nodes are a host. Networking hardware such as modems, hubs, and network switches are not necessarily network addresses allocated (except for administrative purposes sometimes).
8 0
4 years ago
Create a cell reference in a format by typing in the cell name or
Neko [114]

Answer:

D. Create a cell reference in a formula by typing in the cell name or clicking the cell.

Further Explanation:

To create a cell reference in a formula the following procedure is used:

First, click on the cell where you want to add formula.

After that, in the formula bar assign the equal (=) sign.

Now, you have two options to reference one or more cells. Select a cell or range of cells that you want to reference. You can color code the cell references and borders to make it easier to work with it. Here, you can expand the cell selection or corner of the border.

Again, now define the name by typing in the cell and press F3 key to select the paste name box.

Finally, create a reference in any formula by pressing Ctrl+Shift+Enter.

6 0
3 years ago
Other questions:
  • Function of network security​
    9·1 answer
  • Which best explains what Grace did with the revisions?
    7·1 answer
  • Why is ssh preferred over telnet for remote connections?
    10·1 answer
  • Moore’s law states that the number of transistors on integrated circuits doubles approximately every two years?
    15·2 answers
  • Win10如何删除自己添加的环境变量?...............
    8·1 answer
  • Hamilton is the best
    12·1 answer
  • Adrian wants to run a digital movie clip that his friend shared with him through email. His system has 2 GB of RAM and 20 GB of
    9·1 answer
  • how does the use of data abstraction manage complexity in program code? how does using lists make a program easier to develop an
    5·1 answer
  • Which of these would make text on a slide difficult to read?
    7·1 answer
  • ____________ is a process of reverse calculation to achieved a desired result. a. Data Consolidation
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!