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
faust18 [17]
3 years ago
5

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23

. Write function that take a number n and return the sum of all the multiples of 3 or 5 below n.
Mathematics
1 answer:
tiny-mole [99]3 years ago
3 0

Answer:

The function is provided below.

Step-by-step explanation:

Running the program in Python, the code for this problem is as follows:

def func(n):

       count = 0                                           **initializing the sum with 0**

       for i in range (1, n):

                   if i%3 == 0 or i%5 == 0:        

                              count = count + 1

      return (count)

When the program is executed enter value 1 to 10 one by one and the result will be 23, the sum of all the multiples of 3 and 5.

You might be interested in
The bases of a trapezoid are 16.8 yards and 6.9 yards. What is the average of the two bases? 23.7 yd 4.95 yd 9.9 yd 11.85 yd
marusya05 [52]

Answer:

11.85 yards

Step-by-step explanation:

16.8 + 6.9 = 23.7

23.7 / 2 = 11.85

6 0
3 years ago
HELP PLEASE
kolezko [41]

Answer: 16 feet is the width and 25 is length

Step-by-step explanation:

x*(2x-7)=400

Word problem written in numerical form^^^^

Solve for x to get 16

length = 2(16)-7= 25

Check our work

16*25=400 yay

6 0
3 years ago
Which of the following statements about migrant workers is true?
prisoha [69]
Can you put the options down so I can answer your questions please and thank you
8 0
3 years ago
Tengo 50 pollos<br>Metidos en un cajón.<br>Cuantos picos y patas tengo??​
Marrrta [24]
50 picos y 100 patas .
4 0
4 years ago
Evaluate bcl, given a = 5, b=-3, and c= -2.
KATRIN_1 [288]

Answer:

bcl is the same as b•c•l

therefore, -3•-2•5

=30

5 0
3 years ago
Other questions:
  • WILL MARK BRAINLEST FOR RIGHT ANSWER ONLY
    6·2 answers
  • How do you write 9m*-6n*2p*-1/12mn*-5p using only positive exponents
    6·1 answer
  • If 7 times a number is decreased by 33 the result is 15 less than 10 times number . Find the number
    7·2 answers
  • 22 divided by 202 also with the remainders
    14·2 answers
  • Use the GCF and the distributive property, first to answer correct get brainlist
    15·1 answer
  • The perimeter of a rectangle is 120 inches. It's length is 43 inches. Write and solve a number sentence to find the width
    10·1 answer
  • Does 48/144 = 5/15?.......................... I just put the dots because the question has to be 20 characters long sooooooooooo
    5·2 answers
  • Please answer bye 11:20
    10·1 answer
  • What is the volume of the 3d shape created by rotating the square with side lengths of 14cm
    7·1 answer
  • Translate 13 more than n to an algebraic expression
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!