- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
8 Posted Topics
How do I modify this program player has 5 chances to ask a letter is in the word. Computer responds yes and no. Original Exercise - Computer picks a random word from a list and player guesses the word. Computer tells the player how many letters are in the word. … | |
Listed below is the original word jumble python program. According to the exercise i'm supposed to add hints see next thread on my modified program however it doesn't work correctly. [code=python] # Word Jumble # # The computer picks a random word then "jumbles" it # The player has to … | |
Re: This is the code - import random print "\tWelcome to 'Guess my number'!:" print "\nI'm thinking of a number between 1 and 100." print "Try to guess it in as few attempts as possible.\n" #set the initial values the_number = random.randrange(100) + 1 guess = int(raw_input("Take a guess: ")) tries … | |
Character creating program ie Dungeons and Dragons. Player has 30 points to spend on 4 attributes - strength, health, wisdom, and dexterity. Player should be able to spend points from the pool on any attribute and should be able to take points from an attribute and put them back into … | |
How do I subtract or add in a lists? When I run the program below I get the message print int(pool-strength) TypeError: unsupported operand type(s) for -: 'list' and 'int' [code=python] # Character Development Dungeons and Dragons # pool are the total points that I can use. pool = [30] … | |
Created a program random words with a list. When I run the program it will output duplicated items. How do I prevent that. Is there a special command to prevent that? [code=python]import random # random choice from a list for i in range(6): print random.choice (["abacus", "biology", "chemistry", "dog", elf", … | |
How do I get python to pick a random word? Do I have to link it with a dictionary? If so how do you do that. Exercise from Python Programming for the absolute beginner Create a game where computer picks a random word and player has to guess the word. … | |
What's the command that allows you to do that. The chapter that i'm reading lists slicing, but I don't see how that helps if you don't have a fixed value of the word. [Code=Python] # Program that gets a message from user and computer prints it out backward. message = … |
The End.