Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Go4Lindz

  • 3 years ago

In Python, how can you choose a random number from a range of numbers (and assign its value to x)?

  • This Question is Open
  1. willlamb
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    http://openstudy.com/study?login#/updates/500737dae4b020a2b3bcd153

  2. irfans
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    you can import randint from random and use that to get a random number , you can use following code to get a random number between 0 and 10 . -- code -- from random import ran dint x=randint(0,10) --code--

  3. marioluan
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    https://gist.github.com/4238607#file-roll_dice-py

  4. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy