Confusing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Koggis
    New Member
    • Nov 2008
    • 2

    Confusing

    Code:
    def mySlicer (x, y, z):
        result = ""
        x1 = 0
        if y > len(z):
            y = len(z)
        while y - x1 >= len(result):
            if x1 < y:
                result = result + z[x]  
                x = x + 1
                x1 = x1 + 1
            
            print result
    What´s the problem?
    Cheers
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    What do you mean, where's the problem?

    You shouldn't just dump code on the experts here without providing at least your output and error messages, if any.

    Also, you need a more descriptive title. I'd change it for you, but since you haven't explained your problem, I don't know what to change it to.

    Also, please use [CODE] tags, when you post code. When you do, you preserve your indention, which is important in python.

    MODERATOR

    Comment

    • Koggis
      New Member
      • Nov 2008
      • 2

      #3
      Originally posted by insertAlias
      What do you mean, where's the problem?

      You shouldn't just dump code on the experts here without providing at least your output and error messages, if any.

      Also, you need a more descriptive title. I'd change it for you, but since you haven't explained your problem, I don't know what to change it to.

      Also, please use [CODE] tags, when you post code. When you do, you preserve your indention, which is important in python.

      MODERATOR
      Btw you can just delete the thread.
      Thanks

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        Are you sure? If you give some more information I'll help you clean it up...or did you solve it yourself?

        Comment

        Working...