User Profile

Collapse

Profile Sidebar

Collapse
Indigestion
Indigestion
Last Activity: Dec 21 '09, 09:17 PM
Joined: Dec 21 '09
Location: Spain
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Indigestion
    replied to Loops and checking for string starts
    In fact, your answer did help me (however it had nothing to do with my question), because your arguments reminded me somehow of a list, and remembered the possibility of turning a word into a list.

    Then, it was easy to check for this list's first letter, and see if it was a vowel or not.

    For anyone interested, this is the final code:

    Code:
    from random import randrange
    
    #Simulates a fight
    ...
    See more | Go to post

    Leave a comment:


  • Indigestion
    started a topic Loops and checking for string starts

    Loops and checking for string starts

    I've started with Python recently, reading a book.
    Unfortunately, I've come through an error I do now know how to resolve.

    If you could please help me, it would be greatly appreciated.

    Code:
    from random import randrange
    
    #Simulates a fight
    
    monsters = [
        'Goblin',
        'Orc',
        'Human',
        'Soldier',
        'Fighter',
        'Night Elf'
        ]
    
    rnd
    ...
    See more | Go to post
No activity results to display
Show More
Working...