Computer Science, asked by ASweety1431, 11 months ago

write a Python program that creates a list of all the integers less than 100 that are multiples of 3 or 5 !!

Plzz do it ASAP !!​

Answers

Answered by Harsha7177
12

Answer:

Explanation:nums = [3, 5]

max = 999

result = 0

for num in nums:

for i in range(1,max):

if num*i < max:

result += num*i

print result

result = 0

for i in range(0,max):

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

result += i

print result


ASweety1431: excuse me ???
ASweety1431: u know Python programming language????
Answered by DMani3
11

The code is,

import numpy as np

x = np.arange(1, 100)

n= x[(x % 3 == 0) | (x % 5 == 0)]

print(n[:100])

Similar questions