Answer:125
Step-by-step explanation:
Sorry I can't lol but hope someone else can
Answer:
M=8
Step-by-step explanation:
There is a 77.78% probability that the number chosen is less then 29 or is odd. To solve for this, add the probabilities of the expected events and then subtract the remaining values. 6/9 + 6/9 - 2/9 = 0.7777 x 100 = 77.78% This is when all the elemental probabilities are equal. I hope this helps you on your assignment.
Answer:
Written in Python
def sums(n):
total = 0
for i in range(1,n+1):
if i%2 == 0:
total = total + i*2
else:
total = total + i
return(total)
Step-by-step explanation:
The function is written in Python
def sums(n):
This initializes total to 0
total = 0
This iterates through the integers that makes up n i.e. 1,2,3.....n
for i in range(1,n+1):
This checks if current digit is even
if i%2 == 0:
If yes, it adds the double of the digit
total = total + i*2
else:
If otherwise, it adds the digit
total = total + i
This prints the calculated sum or total
return(total)
To call the function from main, use the following:
print(sums(n))
Where n is a positive integer. i.e.