LearnPy Hub
← Iterators & Generators problems
Easy

Multiples Generator

Write a generator multiples(k, n) that yields k, 2k, …, nk. Read k and n and print tuple(multiples(k, n)).

Input

Two integers.

Output

A tuple.

Sample 1

Input
3
4
Output
(3, 6, 9, 12)

Sample 2

Input
5
1
Output
(5,)
solution.py
Output appears here
Multiples Generator · Python practice problem · LearnPy Hub