Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

B 4.1.6 Worksheet 2 Python

Name: _________________________ Scenario: You have a hash table implemented with an array of size 8 (indices 0-7). 1. Hashing Function A: hash_value = len(key) Calculate the final index for each key using the formula: index = len(key) % 8 key = "apple" -> len is 5 -> 5 % 8 = ____ key = "banana" -> len is 6 -> 6 % 8 = ____ key = "strawberry" -> len is 10 -> 10 % 8 = ____ key = "kiwi" -> len is 4 -> 4 % 8 = ____ 2....

Help