About 13,400,000 results
Open links in new tab
  1. math - finding multiples of a number in Python - Stack Overflow

    Jan 28, 2013 · I'm trying to write a code that lets me find the first few multiples of a number. This is one of my attempts: print(n, end = ' ') I figured out that, by putting for m in (n, m):, it would …

  2. To check whether a number is multiple of second number

    Jul 16, 2015 · Use and operator instead of bitwise & operator. You need to conver values to integers using int() if x!=0 and (y%x)==0 : print("true") else:

  3. Python program to print multiples of a given number

    Apr 29, 2023 · In this programming article, we are going to learn. The program to find the multiple sof a number in python is as follows: print ("The multiples are: ") for i in range (1,11): print …

  4. Python Program For Multiples Of 3 And 5 (With Code & Examples)

    To find multiples of 3 and 5 in Python, you can write a program that iterates through a range of numbers and checks if each number is divisible by either 3 or 5. Here’s an example of how …

  5. Multiples of a Number in Python | Check if multiple of 3 or 5 or N

    2 days ago · Multiple of any given number can be determined by following basic rules. Suppose we need to extract a multiple of a given number x and require to find n multiples for x. Here is …

  6. python - Create a list of multiples of a number - Stack Overflow

    Create a Python 3 function that takes two numbers (value, length) as arguments and returns a list of multiples of value until the size of the list reaches length. """ Value is number to be multiply. …

  7. Print first m multiples of n without using any loop in Python

    Dec 19, 2024 · range(1, m + 1) generates numbers from 1 to mmm, inclusive. For each number in the range, it computes n×i. The result is stored in a list multiples. Let’s explore some more …

  8. Print first n multiples of a given number using python

    Hello, in this post I am going to show you how you can print out n mulitples of a value using a custom python program. Alright first of all, let me paste the code here for you then i'll go over it …

  9. how to find the multiples of a number in python - GrabThisCode

    Jun 29, 2021 · print(i*m)

  10. Write a python program if the given number is multiple of 2 or not

    Jan 30, 2023 · In this program, we need to check if the given number is a multiple of 2 or not. First we'll enter a number and store it in a variable 'n'. After that, the variable is passed through a …

Refresh