turtle.numinput()

turtle.numinput(title, prompt, default=None, minval=None, maxval=None)

Parameters:
  • title – string
  • prompt – string
  • default – number (optional)
  • minval – number (optional)
  • maxval – number (optional)

Pop up a dialog window for input of a number. title is the title of the dialog window, prompt is a text mostly describing what numerical information to input. default: default value, minval: minimum value for input, maxval: maximum value for input The number input must be in the range minval .. maxval if these are given. If not, a hint is issued and the dialog remains open for correction. Return the number input. If the dialog is canceled, return None.

>>> screen.numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000)
doc_python
2016-10-07 17:45:33
Comments
Leave a Comment

Please login to continue.