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
sukhopar [10]
2 years ago
9

Define an action adder :: io () that reads a given number of integers from the key board, one per line, and displays their sum.

For example:.
Mathematics
1 answer:
aleksandrvk [35]2 years ago
4 0

The program is an illustration of loops

<h3>What are loops?</h3>

Loops are program statements that are used to perform repetition

<h3>The main program</h3>

The program written in Python, where comments are used to explain each line is as follows:

#This initializes sum to 0

summ = 0

#This gets input for the first number

num = int(input())

#This is repeated while num is not -1

while num!= -1:

   #This calculates the sum

   summ+=num

   #This gets input for the num

   num = int(input())

#This prints the sum

print(summ)

Read more about loops at:

brainly.com/question/16397886

You might be interested in
Suppose a consumer product researcher wanted to find out whether a highlighter lasted less than the manufacturer's claim that th
11111nata11111 [884]

Answer:

The null hypothesis is H_0: \mu = 14

The alternate hypothesis is H_a: \mu < 14

The test statistic is t = -1.95.

The p-value is of 0.0292. This means that for a level of significance of 0.0292 and higher, there is sufficient evidence to conclude that the  highlighters wrote for less than 14 continuous hours.

Step-by-step explanation:

Suppose a consumer product researcher wanted to find out whether a highlighter lasted less than the manufacturer's claim that their highlighters could write continuously for 14 hours.

At the null hypothesis, we test if the mean is 14 hours, that is:

H_0: \mu = 14

At the alternate hypothesis, we test if the mean is less than 14 hours, that is:

H_a: \mu < 14

The test statistic is:

t = \frac{X - \mu}{\frac{s}{\sqrt{n}}}

In which X is the sample mean, \mu is the value tested at the null hypothesis, s is the standard deviation of the sample and n is the size of the sample.

14 is tested at the null hypothesis:

This means that \mu = 14

X = 13.6 hours, s = 1.3 hours. Sample of 40:

In addition to the values of X and s given, we have that n = 40

Test statistic:

t = \frac{X - \mu}{\frac{s}{\sqrt{n}}}

t = \frac{13.6 - 14}{\frac{1.3}{\sqrt{40}}}

t = -1.95

The test statistic is t = -1.95.

P-value:

The p-value of the test is the probability of finding a sample mean lower than 13.6, which is a left tailed test, with t = -1.95 and 40 - 1 = 39 degrees of freedom.

Using a calculator, the p-value is of 0.0292. This means that for a level of significance of 0.0292 and higher, there is sufficient evidence to conclude that the  highlighters wrote for less than 14 continuous hours.

5 0
2 years ago
What is the value of y?
777dan777 [17]

Answer:

i need a quetion to be able to answer

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
What impact does negative rational numbers have on whether you add or subtract rational numbers
Artemon [7]
If the signs of the rational numbers are the same, you add them, i.e. ++ or --.
If they are different, you subtract them, i.e. +- or -+
7 0
3 years ago
If m=5, evaluate the following: 20-5m =​
MissTica

Answer:

-5

Step-by-step explanation:

20-5m

20-5(5)

20-25

5.

Is this the answer that you are looking for?

6 0
2 years ago
The product of the place values of two 2’s in 428721 is
ozzi
B) 40,000. the first 2 is 20,000. the second 2 is 2. 20,000 times 2 is 40,000
3 0
3 years ago
Read 2 more answers
Other questions:
  • The sum of two numbers is 56,and their difference is 10.What are the numbers?
    15·1 answer
  • there are 14 NBA teams who do not make the playoffs of these teams 3 of them will be randomly selected to make the 1st, 2nd, and
    11·2 answers
  • The sum of two odd numbers is 42. They are both prime numbers, and the difference of the two numbers is 16. What are the two num
    5·2 answers
  • The line passes through the point (4,2) and has slope of -1
    12·1 answer
  • Olivia earns $8.50 per hour for babysitting her brother. She also earns a weekly bonus of $12 if she helps with
    9·2 answers
  • Write an equation in slope-intercept form that describes the line with a slope of 4 and y-intercept of 1
    5·1 answer
  • -3.8x = -7.4<br> Is x=2 is a solution
    13·1 answer
  • HELP ME?!?!?
    11·2 answers
  • Фd —<br> 969 - 9<br> ХОТХЭ: <br> P
    8·1 answer
  • A farmer wishes to built a fence around a rectangular field; the field is 100 ft. long and 60 feet wide. The fence will be of st
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!