View Single Post
  #19 (permalink)  
Old 02-27-2008, 11:58 PM
v0id's Avatar   
v0id v0id is offline
Super Moderator
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,414
Last Blog:
CherryPy(thon)
Rep Power: 27
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

You could probably use randrange too. I haven't played around with random for a long time, and the only function I remember was the one I used, randint.

You "hardcoded" every possible input, you thought you could get from the user. That's no a good way to do it, if you later want to extend your program. Let's say you were just going to add more random number possibilities.

Floating numbers are the numbers with fractional parts behind the decimal separator, like; 12.34, 1.34, 4353.2354, etc.
Reply With Quote