Adblock breaks this site

I have a question about Python

Discussion in 'Programming General' started by Uzay, Sep 28, 2009.

  1. Uzay

    Uzay Newcomer

    Joined:
    Sep 28, 2009
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0
    I have a question about Python

    Hello Guys,

    I'm Uzay. I'm here to ask you something about Python. I want to write a programm about the game "Craps". This are the rules:

    Here is the site for "Craps": I have the basic code already written, I want to add now bet odds and my question is how and can you help me?

    For information, I am using Python 2.5

    Here is my code:

    Thanks for your help!

    ~Uzay
     
  2. Nullware

    Nullware Guru

    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0
    I have a question about Python

    Why isn't your code indented? It should have been when you used it with the interpreter...
     
  3. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    I have a question about Python

    Ummm....

    Quotes do not keep indentation.
     
  4. Daily

    Daily BANNED FROM MARKET
    Banned

    Joined:
    May 6, 2005
    Posts:
    4,425
    Referrals:
    18
    Sythe Gold:
    5
    I have a question about Python

    Code tags do! :D

    Code:
    #Student Name: Nick Moses
    #Date Started: September 29, 2009
    #Purpose: To convert text to ascii.
    import string
    
    def convert():
        message = "Python SUCKS ASS"
        print message
        for ch in message:
            print ord(ch),
            print
    
    def endOfProgram():
        endofprogram = raw_input("Please hit enter to exit this program.")
        
    def main():
        convert()
        endOfProgram()
        
    
        
    main()
    
     
  5. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    I have a question about Python

    Yes they do. He just used quotes instead of codes. :p
     
< How to get a web page to open when a button is clicked? | G.E. Database Merchant Suggester (Need advise) >


 
 
Adblock breaks this site