Write a program to print the perfect multiple of both 5 as well as 3, within a user given range, using For loop
Answers
Answered by
0
Answer:
hope you understood
Explanation:
believe inclusion of 1 is mistakenly mentioned
Multiples of five should start from a multiple of five ;-)
Here's one possible way to print them in Python
print(*range(5, 101, 5))
If you want a bit more elaborately
res = [i for i in range(5, 101, 5)]
print(*res)
If you want 1 to be included for some unknown reasons, do the following and then print.
res.insert(0,1)
If you want to print the values comma separated
print(*res, sep=',')
If you want to print as a list
print(res)
Hope this helps
Similar questions