Advertisement
Riju21

19_pracc_5_factorial

Mar 29th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. # factorial
  2. # -----------------
  3.  
  4. # x = 3
  5. # final = 1
  6. # for i in range(1, x + 1):
  7. #     final *= i
  8. # print(final)    
  9.  
  10. # square
  11. # -----------
  12.  
  13. x = [1, 3, 5]
  14.  
  15.  
  16. def checkSqr(i):
  17.     for j in range(i):
  18.         print('*' *i)
  19.        
  20. for i in x:
  21.     checkSqr(i)
  22.     print('\n')
  23.  
  24.  
  25. # fetch same digit from numbers
  26. # -------------------------------
  27.  
  28. # def check_digit(str1, str2):
  29. #     sett1 = set(str1)
  30. #     sett2 = set(str2)
  31. #     sett3 = sett1 & sett2
  32. #     print(sett3)
  33. # check_digit('53','25')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement