Driving Sliders Through Numeric Calculations

I'm wondering if someone can help me get started on something like this:

I'm looking to setup a system where a learner would input some numbers, which would lead to a calculation, which would then drive a slider interaction.

So for instance, using baseball as an example:
Student enters Hits (150) and At-Bats (550)
Software calculates the batting average as .273 (hits/at-bats)

Then, that .273 number drives a slider which might look something like this:

1-5 scale slider
1: Bad player
2: Below average player
3: Average player
4: Above average player (where .272 would set the slider)
5: Excellent player

Thanks for taking a look!

2 Replies
Walt Hamilton

Adjust variable Average = variable Hits when numeric entry box AtBats loses focus

Adjust variable Average divide variable AtBatswhen numeric entry box AtBats loses focus

Then if the spacing between the five options is linear (equally spaced), tie the slider to Average, and it will move when Average changes. Fiddle with the start, stop, and steps until you get what you want.

If they aren't equally spaced, tie the slider to Slider1 and translate Average:

Adjust variable Slider1 = value 1 when numeric entry box AtBats loses focus if Average is between 0 and .150 

Adjust variable Slider1 = value 2 when numeric entry box AtBats loses focus if Average is between .151 and .190

Adjust variable Slider1 = value 3 when numeric entry box AtBats loses focus if Average is between .191 and .250