Share your repls and programming experiences

← Back to all posts
undefined post name
thenullified

this is supposed to be a number game...
apparently it sucks
if you still want to play the options available are coin, dice, cups and classic (view code if you want more details)
if you decide to quit, type no or anything that has the meaning of no

Voters
mkw
thenullified
Comments
hotnewtop
TheDrone7

The post name could use a little more work. Also, you might wanna skip the rest of the program if the user gives an invalid input, it takes me into the game even if I don't type a valid game type. Also, you may also want to display the available game types, I had to go through your code to figure them out.

MatReiner

@TheDrone7 null is clickbait. i like it

TheDrone7

You can already see a part of the description, so, it would be better if the title matched the description. Also, clickbaiting is a bad practice. @MatReiner

MatReiner

@TheDrone7 lol yea

MatReiner

@TheDrone7 also, using null is bad practice

MatReiner

@MatReiner Also, putting @ before identifiers is bad practice

MatReiner

@TheDrone7 also, unused literals (i.e null) is a bad practice. You should put an identifier before null
e.g

MatReiner

@MatReiner also, in python, you should use None instead of null. If you want a polyfill, simply put:

TheDrone7

Also, spamming is a worse practice. @MatReiner

MatReiner

TheDrone7, yea, you're right, sorry

thenullified

@TheDrone7 ok how do you think the program is now?

thenullified

@MatReiner err since you are apparently very good at functions can you tell me if there is a function to clear the idle ?

TheDrone7

You can use the clear function from the replit module that you can install using the package manager. @starblazer

MatReiner

@starblazer from os import system, then clear using system('clear')

thenullified

@TheDrone7 @MatReiner alright thanks

MatReiner

@MatReiner also, don't use undefined, it doesn't exist in python. use something like postName = None