Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a python 3 program that implements a hashing function that converts a string to an integer value ( i . e . index )

Write a python3 program that implements a hashing function that converts a string to an integer value (i.e. index). Ask user to enter a string. For each character in the string, convert the character to an ASCII value using ord() function (e.g. ord('A') is 65, ord('B') is 66, etc.). Add up all those values and calculate the remainder when divided by 100. That'll be your address.
Find two distinct strings that ends up with the same hash value.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions