Finds the appropriate number of weighings for each number of balls
The inspiration is a puzzle with 8 balls and a scale. This program calculates the minimum number of weighings needed to find the heavier ball among a given number of balls.
Calculates the minimum number of weighings using mathematical formula:
Takes the number of balls as input from the user. Displays the minimum number of weighings as output.
Enter the number of balls: 8
The minimum number of weighings is: 2
Python 3.x
NumPy library
pip install numpy
Run python maincode.py
MIT License