2 Replies - 405 Views - Last Post: 18 February 2011 - 06:02 PM Rate Topic: -----

#1 Zealon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-February 11

Create a variable that returns a new random number.

Posted 18 February 2011 - 04:06 PM

Hello, I am trying to create a dice in Python.
I have succeded by using
random.randint (1,6) but I have to use continue
to return a new number.
Lets say my variable was hazard1 and once it went
through my loop, it became hazard2 and called for
a new random number, that would help me create an rpg
type menu. Does that make sense?
Is This A Good Question/Topic? 0
  • +

Replies To: Create a variable that returns a new random number.

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,515
  • Joined: 23-August 08

Re: Create a variable that returns a new random number.

Posted 18 February 2011 - 04:11 PM

Check out this snippet and this snippet.
Was This Post Helpful? 0
  • +
  • -

#3 Zealon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-February 11

Re: Create a variable that returns a new random number.

Posted 18 February 2011 - 06:02 PM

sorry

This post has been edited by Zealon: 18 February 2011 - 06:04 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1