Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # factorial
- # -----------------
- # x = 3
- # final = 1
- # for i in range(1, x + 1):
- # final *= i
- # print(final)
- # square
- # -----------
- x = [1, 3, 5]
- def checkSqr(i):
- for j in range(i):
- print('*' *i)
- for i in x:
- checkSqr(i)
- print('\n')
- # fetch same digit from numbers
- # -------------------------------
- # def check_digit(str1, str2):
- # sett1 = set(str1)
- # sett2 = set(str2)
- # sett3 = sett1 & sett2
- # print(sett3)
- # check_digit('53','25')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement