Posts by HomeDown • 29 points
4 posts
-
0
votes1
answer48
viewsQ: Function returning None, when if or Else runs
How do I make the following function not return None? def dif(x, z): if x != z: print('\nNúmeros diferentes') return else: print('\nNúmeros iguais') return n1 = int(input('Um número: ')) n2 =…
-
-4
votes1
answer57
viewsQ: Try no for - PYTHON
Guys, how do I use Try no for? When it falls in except and the person type a string, it gives another error and terminates the program, in while I can use normally. I tried using a for loop with…
-
0
votes1
answer113
viewsQ: Python hangman
Guys, I’m playing a little python hangman game. My doubt is as follows: how do I order the hits according to the chosen word of the gallows and make it duplicate the letter I typed if there is more…
-
0
votes1
answer77
viewsQ: How to distribute inputs in lists randomly?
How do I input nome + numero + outro in one thing and then place them in one of those lists (A, B, C ,D) randomly in the Python language? A = [] B = [] C = [] D = [] for k in range(12): nome =…