DityaSen

Untitled

May 24th, 2023
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. n = int(input("How Many times do you want this repeat?\n-> "))
  2. count = 0
  3. a = b = rem = 0
  4.  
  5. product = 1
  6.  
  7.  
  8. for i in range (1, n + 1):
  9.     try:
  10.         print(f"Iteration {i} : ")
  11.         a = int(input("Enter Number 1: "))
  12.         b = int(input("Enter Number 2: "))
  13.         print()
  14.         product = a*b
  15.         rem = product%10
  16.         if rem == 0:
  17.             count +=1
  18.         else:
  19.             continue
  20.     except ValueError:
  21.         print("Only Integers please!")
  22.    
  23.  
  24. print(f"The Number of 0's in last places are {count}")
Advertisement
Add Comment
Please, Sign In to add comment