How to make this add every number %a == 0 in the loop:
b = int(input())

for i in range(0,101):
if i % b == 0 :
print(i)

I need to sum up the numbers that can be divided by the integer of b, if i type in the number 30, then i want to sum up 30 + 60 + 90

How do I do this?

Nov 4, 2020 in Python 200 views

## 1 answer to this question.

You can go through the given below code:

```b = int(input())
s=0
for i in range(0,101):
if i % b == 0 :
s+=i
print(s)```
• 65,930 points

## How to add to the python path in Windows?

You know what has worked for me ...READ MORE

## How to count the number of elements in a list?

To count the number of elements of ...READ MORE

## How to find the greatest number in a list in Python?

1. By using max function -  highest = ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## Lowercase in Python

You can simply the built-in function in ...READ MORE