Suggestion Python3 | Sololearn: Learn to code for FREE!


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....

3/28/2020 1:14:40 PM


8 Answers

New Answer


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.


What's the game you want to do, using random? Can you tell us?


HonFu ive build rock paper scissors and i dont have another idea except tic tac toe but i dont know how



HonFu how do you make random operator i can only do random question


You could use random.choice for it: ops = ['+', '-', '*', '/'] op = random.choice(ops) Then... if op=='+': result = x+y ... and so on.


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.