Skip to content

ZEROONES

  • Home
  • Verilog
  • Python
  • Arduino
  • C
  • Contact

ZEROONES

  • Home
  • Verilog
  • Python
  • Arduino
  • C
  • Contact

Python Program To Print Largest Prime Factors Of A Given Number

6 November 2022 by zeroones.org

Python Program To Print Largest Prime Factors Of A Given Number Example def largestPrimeFactor(number): n = number i = 2 while ((i*i) <= n): if (n%i): i+=1 else: n//=i print("Largest …

Read more

Python Program To Print Total Number Of Factors Of A Given Number

5 November 2022 by zeroones.org

Python Program To Print Total Number Of Factors Of A Given Number Example def numberOfFactors(N): counter = 2 factorsArray= [1] for i in range(2,N//2): if (N%i == 0): factorsArray.append(i) counter …

Read more

Python Program To Find Factors Of A Number Using Function

4 November 2022 by zeroones.org

There are a lot of methods in Python to find the factor or divisor of a given number and almost all the methods can be implemented using a function. Because …

Read more

Python Program To Find Factors Of A Number Using While Loop

3 November 2022 by zeroones.org

Python Program To Find Factors Of A Number Using While Loop Example def factors(x): print("Factors Of {}:".format(x)) i = 1 while(i < (x+1)): d=x%i if d==0: print(i) i+=1 n=18 # …

Read more

Python Program To Find Factors Of A Number Using Recursion

2 November 2022 by zeroones.org

Python Program To Find Factors Of A Number Using Recursion Example def factors(x,i): if(x >= i): if ((x%i)==0): print(i) factors(x,i+1) n=18 # n = int(input(“Enter Integer Value: “)) factors(n,1) Output: …

Read more

Python Program To Find Factors Of A Number Using For Loop

1 November 2022 by zeroones.org

Python Program To Find Factors Of A Number Using For Loop Example def factors(x): print("Factors Of {}:".format(x)) for i in range(1,x+1): d=x%i if d==0: print(i) n=18 # n = int(input("Enter …

Read more

Python Program To Find Factorial Using While Loop

31 October 2022 by zeroones.org

Python Program To Find Factorial Using While Loop Example N = int(input("Enter a number: ")) factorial = 1 counter = 1 while counter <= N: factorial = factorial * counter …

Read more

Python Program To Convert Decimal Into Binary Using List

30 October 2022 by zeroones.org

Python Program To Convert Decimal Into Binary Using List Example n=10 array=[] def decimalToBinary(N): string = "" while(N>0): a=int(N%2) array.append(a) N = N//2 for i in range(0,len(array)): string += str(array[i]) …

Read more

Python Program To Find Area Of A Right Angled Triangle

29 October 2022 by zeroones.org

Python Program To Find Area Of A Right Angled Triangle The above image is showing the “Pythagoras theorem” where the sum of the “BASE” square and the “PERPENDICULAR” square is …

Read more

Python Program To Convert Decimal Into Binary Using String

28 October 2022 by zeroones.org

Python Program To Convert Decimal Into Binary Using String Example n=10 def decmialToBinary(N): string = "" while(N>0): a=int(N%2) string += str(a) N = N//2 print(string[::-1]) decmialToBinary(n) Output: 1010

Older posts
Newer posts
← Previous Page1 … Page20 Page21 Page22 … Page38 Next →

Recent Posts

  • C Programming File handling
  • C Programming Unions
  • C Programming Structures
  • C Programming Pointers
  • C Programming Arrays
© 2026 zeroones, All Rights Reserved.