Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 29th, 2004, 01:29 PM
perfect20002 perfect20002 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 28 perfect20002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
what wrong with this program it won't work

import random
die1 = random.randrange(6)+1
die2 = random.randrange(6)+1
total = die1 + die2
raw_input('press the enter key to exit')

Reply With Quote
  #2  
Old March 29th, 2004, 02:04 PM
lnxgeek lnxgeek is offline
I AM A GOLDEN GOD
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Apr 2003
Location: Camarillo, California
Posts: 5,932 lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 3 Days 16 h 44 m 38 sec
Reputation Power: 1165
Works for me; although it really doesn't 'do' anything. What were you expecting?

Try
Code:
import random
die1 = random.randrange(6)+1
die2 = random.randrange(6)+1
total = die1 + die2
print die1, die2, total
raw_input('press the enter key to exit')
__________________
"Seriously, we're not a search engine, we're actual people." ~ ManiacDan

BookMooch.com : Give books away. Get books you want.

Reply With Quote
  #3  
Old March 29th, 2004, 08:23 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,537 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 17 m 47 sec
Reputation Power: 68
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
I dont see a problem here either although you might want to try the randint() function instead. Geeks right though, this doesn't really do anything anyway so its kinda hard to guess what you want . Gonna give us a hint?

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > what wrong with this program it won't work

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap