A scale can be used to select a number within a range. Here the range is from 1 to 10.
The number selected is printed in the label just underneath it, using the command function of the Scale.
Whenever the command is invoked by a scale change, a parameter is passed by Tkinter. It is referred to as e here, but it does not make any difference what we call it, as long as we are consistent.
from tkinter import *
from tkinter.ttk import *
root = Tk()
scaleVal = StringVar()
scale = Scale(root, from_=1, to=10,
orient = HORIZONTAL,
command = lambda e: scaleVal.set('%.3f' % float(e)))
scale.pack(fill = X)
label = Label(root, textvariable = scaleVal, pad = 100)
label.pack(expand = True)