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
Vikki [24]
3 years ago
10

Write a simple nested loop example that sums the even and odd numbers between 5 and 15 and prints out the computation.

Computers and Technology
1 answer:
lianna [129]3 years ago
4 0

Answer:

for e in range(6, 15, 2):

for o in range(5, 15, 2):

calc = e+o

print(e, "+", o, "=", calc)

Explanation:

You might be interested in
Which menu would most likely allow you to choose a font A.file B.Edit C.format D.insert​
Ksivusya [100]

Answer:

D

Explanation:

7 0
3 years ago
For this problem, you will write a function standard_deviation that takes a list whose elements are numbers (they may be floats
Evgesh-ka [11]

Answer:

  1. import math  
  2. def standard_deviation(aList):
  3.    sum = 0
  4.    for x in aList:
  5.        sum += x  
  6.    
  7.    mean = sum / float(len(aList))
  8.    sumDe = 0
  9.    for x in aList:
  10.        sumDe += (x - mean) * (x - mean)
  11.    
  12.    variance = sumDe / float(len(aList))
  13.    SD = math.sqrt(variance)
  14.    return SD  
  15. print(standard_deviation([3,6, 7, 9, 12, 17]))

Explanation:

The solution code is written in Python 3.

Firstly, we need to import math module (Line 1).

Next, create a function standard_deviation that takes one input parameter, which is a list (Line 3). In the function, calculate the mean for the value in the input list (Line 4-8). Next, use the mean to calculate the variance (Line 10-15). Next, use sqrt method from math module to get the square root of variance and this will result in standard deviation (Line 16). At last, return the standard deviation (Line 18).

We can test the function using a sample list (Line 20) and we shall get 4.509249752822894

If we pass an empty list, a ZeroDivisionError exception will be raised.

3 0
3 years ago
A web designer must effectively communicate when he/she designs a web page. If there is too much information to put onto one pag
valina [46]
Usually they'll add a link to the bottom of the page to the next page.

7 0
3 years ago
What permanent magnets of a motor are replaced with more powerful ones, what effect do you think this would have on motor rotati
Marat540 [252]
When permanent magnets of a motor are replaced with more powerful ones, the motor rotation will increase. This is because there is more electricity being generated.
7 0
3 years ago
Read 2 more answers
The auto recover function in a word is available to especially if you experience powerful failure explain what happens to your d
Komok [63]

Answer:

When the document is not saved before the application is closed, The word application assumes that the file is not important, so does not save a recovery file, but to recover the file open the application and go to the recently opened file, do not edit the file, go to the bottom of the document and click on recovery or use the CTRL-Z shortcut key.

Explanation:

Microsoft word is a word processing application used to make and edit word documents. The recovery option in the word application is an essential tool in Word that prevents a permanent loss of documents in production and can be used to retrieve saved and unsaved documents.

7 0
3 years ago
Other questions:
  • Select the correct answer.
    8·2 answers
  • What is the boundary folding method?
    5·1 answer
  • Which of the following is an object-oriented prototype-based language? Java Pike REBOL MATLAB
    9·1 answer
  • Software that helps users to communicate with family, friends and business colleagues by posting personal information, status up
    13·2 answers
  • What is a major way that a consumer can protect himself/herself when getting a credit card? A) Making sure that they get a very
    8·1 answer
  • Write a generic C++ function that takes an array of genericelements and a scalar of the same type as the array elements. Thetype
    13·1 answer
  • Assume you're using a three-button mouse. To access shortcut menus, you would
    9·1 answer
  • Question 1(Multiple Choice Worth 5 points)
    9·1 answer
  • Why should you try out a camera bag before taking it on a vacation?
    7·2 answers
  • 8. Choose the 3 correct statements for the code below.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!