+ 1
Suggestion Python3
Im trying to make a simple console game with random module and i can't seem to find a way to make use of it rather than having chances and random output i need suggestion....
7 odpowiedzi
+ 9
You could make a maths game, where the user is asked questions like 'What's x+y?', determining numbers and operator by random.
Or make a hangman, choosing words randomly from a list of words.
Or a poker game, shuffling and sharing the cards randomly.
Or some dice game.
Any game that involves luck will be suitable for using random.
+ 5
What's the game you want to do, using random? Can you tell us?
+ 3
HonFu ive build rock paper scissors and i dont have another idea except tic tac toe but i dont know how
+ 1
HonFu how do you make random operator i can only do random question
+ 1
You could use random.choice for it:
ops = ['+', '-', '*', '/']
op = random.choice(ops)
Then...
if op=='+':
result = x+y
... and so on.
+ 1
Try a guess the number game where you ask for a number between a certain range and if it's too high send him a message of "it's too high" if the number is very big or "too small" if it's very small, give the player a number of chances to guess the right number, six chances for example.