if guess == 'help':
You could make each of these branches its own function. This would shorten the code a bit and make it clearer because you could name the function something informative like: print_help()
if guess == 'help':
You could make each of these branches its own function. This would shorten the code a bit and make it clearer because you could name the function something informative like: print_help()
total_number_of_guesses = 6
For extra credit, make all these constants inputs! So the user could choose to play wordle with a 3 or even 10 letter word! :-)
word_length = 5
Often people will put the stuff at the top level (like this variable declaration, for instance) into a function, then only have one top level statement that looks like:
if name == 'main': my_top_level_function()
Doing so makes it so that other users can import your code without having it run. If you do it like this, the my_top_level_function will only run if it is directly invoked by the interpreter.
def get_random(list):
Could be replaced with random.choice(list)
our cumulative insights from our journey that has been motivated by a quest to make the world a better place where everyone has access to safe water on tap, the engineering challenge of optimizing the design of drinking water treatment plants, and the curiosity to understand what controls their performance. We would like to understand what determines which contaminants make it the whole way through a wate
I like this