Posts by Washington Luis • 90 points
5 posts
-
1
votes2
answers142
viewsA: Problems for player play order in Tic-tac-toe
Dear jmb2001, without wanting to modify much your program but seeking to simplify it I did it in the following way: import os def players(flag): if flag: return 'X' else: return 'O' def play(): flag…
-
-3
votes3
answers329
viewsA: Why does my "Try" in Python not work?
Vincenslau if you want to save the input value in the variable x do as follows: while True: x = input("Por favor, insira um número: ") try: x = int(x) break except ValueError: print("Somente…
-
2
votes1
answer3554
viewsA: How to make a Bruteforce in Python?
I already gave my joinha to C.Bohok, above, but one problem I found is that if we include a character in the password (for example: #) that does not have in digits his program will run until it…
-
1
votes3
answers629
viewsA: Python: Indexerror: list index out of range
Change the function’s Return by hkotsubo by the following: return ('%s -> \'%s\'' % (not bool(pilha), string)) so you can see the string that was passed to the function.…
pythonanswered Washington Luis 90 -
4
votes2
answers789
viewsA: Replace all characters in a string with another character
I’m sorry to ask, but what would be the second parameter (lettersGuessed) of the function getGuessedWord. Because from what I am seeing it is not being used. And from what I understood of the…