Find the position of number that is multiple of certain number Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report In this type of question, a number is given and we have to find the position or index of all multiples of that number. For doing this question we use a function named numpy.argwhere(). Syntax: numpy.argwhere(array) Example 1: Sometimes we need to find the indexes of the element that are divisible by int or float number. Python3 # Importing Pandas and Numpy libraries import pandas as pd import numpy as np # Creating a Series of random numbers n_series = pd.Series(np.random.randint(1, 25, 15)) print("Original Series:\n") print(n_series) # Finding the indexes of numbers divisible by 3 res_index = np.argwhere(n_series % 3==0) print("Positions of numbers that are multiples of 3:\n") print(res_index) Output: In the above example, we find the indexes of all numbers divisible by 3. Example 2: Python3 # Importing Pandas and Numpy libraries import pandas as pd import numpy as np # Creating a Series of random numbers n_series = pd.Series(np.random.randint(1, 20, 10)) print("Original Series:\n") print(n_series) # Finding the indexes of numbers divisible by 3.5 res_index = np.argwhere(n_series % 3.5==0) print("Positions of numbers that are multiples of 3.5:\n") print(res_index) Output: In the above example, we find the indexes of all numbers divisible by floating-point number 3.5 Comment More infoAdvertise with us Next Article Find nth number that contains the digit k or divisible by k. V vanshgaur14866 Follow Improve Article Tags : Python Python-pandas Python pandas-series Python Pandas-exercise Practice Tags : python Similar Reads Count of numbers in a range that does not contain the digit M and which is divisible by M. Given three integers, the lower range L, the upper range U, and a digit M. The task is to count all the numbers between L and U such that the number is divisible by M and, also, it does not contain the digit M. Examples: Input: M = 9 ,L = 16 , U = 26 Output: 1 Explanation: Within this given range ,t 5 min read Find nth number that contains the digit k or divisible by k. You have given two number n and k. You need to find the n-th number that contains the digit k or divisible by k (2 <= k <=9 ).Examples: Input : n = 15, k = 3 Output : 33 Explanation : ( 3, 6, 9, 12, 13, 15, 18, 21, 23, 24, 27, 30, 31, 33 ). These are those number who contain the digit k = 3 or 7 min read Check if Y can be made multiple of X by adding any value to both Given two numbers X and Y (X ⤠Y), you can select any positive integer Z and add them to both X and Y. The task is to find whether it is possible to make X a multiple of Y. Examples: Input: X = 7, Y = 15Output: Yes????xplanation: We can choose Z = 1 and add them to 7 and 15. Thus, 7 + 1 = 8 is a fac 6 min read Find the smallest binary digit multiple of given number A decimal number is called a binary digit number if its digits are binary. For example, 102 is not a binary digit number and 101 is.We are given a decimal number N, we need to find the smallest multiple of N which is a binary digit number, Examples: Input : N = 2 Output: 10 Explanation: 10 is a mult 7 min read Smallest multiple of N formed using the given set of digits Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the digits from S and is a multiple of N. Note that the digits from the set can be used multiple times. Examples: Input: S[] = {5, 2, 3}, N = 12 Output: 252 We can observe that 2 10 min read Smallest number greater than or equal to N which is divisible by its non-zero digits Given an integer N, the task is to find the smallest number greater than or equal to N such that it is divisible by all of its non-zero digits. Examples: Input: N = 31Output: 33Explanation: 33 is the smallest number satisfying the given condition. At Unit's place: 33%3 = 0At One's place: 33%3 = 0 In 7 min read Like