Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- 190
- hashing1
- Name
- """
- hashList = []
- Hash = 0
- x = input("Please input a string: ")
- m = len(x)
- for i in range(len(x)):
- hashList.append(x[i])
- newXOrds = ord(hashList[i])*m
- m -= 1
- Hash = Hash + newXOrds
- Hash %= 11
- print("The string contains:", hashList)
- print("The Hash is:", Hash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement