subject
Mathematics, 20.11.2020 14:00 july00

Write a function that is passed in a positive integer, n, and sum up all the digits from 1 to n, doubling the even numbers. In other words, calculate and return the following sum. if n is odd: 1 (2 * 2) 3 (4 * 2) ... ((n - 1) * 2) n if n is even: 1 (2 * 2) 3 (4 * 2) ... (n - 1) (n* 2)

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 14:30
Christine went shopping and bought each of her six six nephews a? gift, either a video costing? $14.95 or a cd costing? $16.88. she spent ? $ 97.42 97.42 on the gifts. how many videos and how many cds did she? buy?
Answers: 1
question
Mathematics, 21.06.2019 15:20
(a) (8%) compute the probability of an even integer among the 100 integers 1! , 2! , 3! , until 100! (here n! is n factorial or n*(n-1)*(n-2) *… 1) (b) (16%) compute the probability of an even integer among the 100 integers: 1, 1+2, 1+2+3, 1+2+3+4, …., 1+2+3+… + 99, and 1+2+3+… + 100
Answers: 1
question
Mathematics, 21.06.2019 15:50
Create and solve a linear equation that represents the model, where squares and triangles are shown evenly balanced on a balance beam. assume the weight of a square is 1 unit and the weight of a triangle is unknown.
Answers: 3
question
Mathematics, 21.06.2019 18:30
You were told that the amount of time lapsed between consecutive trades on the new york stock exchange followed a normal distribution with a mean of 15 seconds. you were also told that the probability that the time lapsed between two consecutive trades to fall between 16 to 17 seconds was 13%. the probability that the time lapsed between two consecutive trades would fall below 13 seconds was 7%. what is the probability that the time lapsed between two consecutive trades will be between 14 and 15 seconds?
Answers: 3
You know the right answer?
Write a function that is passed in a positive integer, n, and sum up all the digits from 1 to n, dou...
Questions
question
History, 28.01.2020 03:31
question
Mathematics, 28.01.2020 03:31
Questions on the website: 13722359