7. Write a python program to iterate the numbers from 1 to 20. All the numbers which able to be multiplied by 3 replaced with 'Bee' and the numbers which able to be multiplied by 5 replaced with 'Jee'.
The output is:
Expected Answer:
Bee
0
1
2
Bee
3
4
Jee
5
Bee
6
7
8
Bee
9
Jee
10
11
Bee
12
13
14
Bee
15
16
17
Bee
18
19
Jee
20
Sample Answer:
for i in range(21): if i % 3 == 0: print("Bee") elif i % 5 == 0: print("Jee") print(i)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)