Skip to content

zeroones

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

python qna

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

Python Program To Check Three Input Values Representing Right Angled Triangle Or Not

27 October 2022 by zeroones.org

Python Program To Check Three Input Values Representing Right Angled Triangle Or Not The above image is showing the “Pythagoras theorem” where the sum of the “BASE” square and the …

Read more

Python Program To Print All ASCII Values

26 October 2022 by zeroones.org

Python Program To Print All ASCII Values   Example def printASCIIValues(): for i in range(32,127): print('The Decimal Value ',i,' Has ASCII Value ',chr(i)) printASCIIValues() Output: The Decimal Value 32 Has …

Read more

Python Program To Find First Time Of Occurrences Index Of An Element In List

25 October 2022 by zeroones.org

Python Program To Find First Time Of Occurrences Index Of An Element In List Example def firstTimeOccuringIndex(dataArray,N): count = 0 for i in range(0,len(dataArray)): if(dataArray[i] == N): print("{} is First …

Read more

Python Program To Find The Total Number Of Occurrences Of An Element In List

24 October 2022 by zeroones.org

Python Program To Find The Total Number Of Occurrences Of An Element In List Example def elementOccuranceData(dataArray,N): count = 0 for i in range(0,len(dataArray)): if(dataArray[i] == N): count+=1 print(“{} is …

Read more

Python Program To Find LCM Of Two Numbers

23 October 2022 by zeroones.org

Python Program To Find LCM Of Two Numbers Example def lcmCalculation(x, y): greater = max(x,y) while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater …

Read more

Older posts
Newer posts
← Previous Page1 … Page3 Page4 Page5 … Page10 Next →

Recent Posts

  • Top 50+ Python String Functions
  • The Next-Gen PCIe 7.0: What It Means for Computing
  • Open-Source EDA Tools for VLSI Design
  • NULL and nullptr in C++
  • Developing and Testing RISC-V SystemVerilog RTL with Open-Source Tools
© 2025 zeroones, All Rights Reserved.