Computer Science, asked by KarthikSri101, 5 months ago

Write a python program to input a number and print its first five multiples​

Answers

Answered by bhumikachaudhari224
1

Answer:

>>> max_num = 100. >>> multiples = [1] + [5 * i for i in range(-max_num, max_num)][max_num + 1:max_num + 20] + [max_num] >>> print(multiples)

...

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)

hope you are having a good day ❤️ ✌️

Similar questions