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

28th Mar 2020, 1:14 PM
CutieRei
CutieRei - avatar
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.
28th Mar 2020, 1:23 PM
HonFu
HonFu - avatar
+ 5
What's the game you want to do, using random? Can you tell us?
28th Mar 2020, 1:19 PM
HonFu
HonFu - avatar
+ 3
HonFu ive build rock paper scissors and i dont have another idea except tic tac toe but i dont know how
28th Mar 2020, 1:20 PM
CutieRei
CutieRei - avatar
25th Jan 2021, 5:41 AM
‎ Герман Папанов(הרמן פפנוב)‎
‎ Герман Папанов(הרמן פפנוב)‎ - avatar
+ 1
HonFu how do you make random operator i can only do random question
28th Mar 2020, 1:30 PM
CutieRei
CutieRei - avatar
+ 1
You could use random.choice for it: ops = ['+', '-', '*', '/'] op = random.choice(ops) Then... if op=='+': result = x+y ... and so on.
28th Mar 2020, 1:32 PM
HonFu
HonFu - avatar
+ 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.
28th Mar 2020, 1:54 PM
Ali Abdelhady
Ali Abdelhady - avatar