Posts by Crow404 • 83 points
6 posts
-
2
votes5
answers135
viewsQ: Problems with arrays in a Python password generator
I’m making a generator of passwords and I’m not able to join letters that are separated into one array. from random import choice minusculas = ['a','b','c','d','f','g','h'] maiusculas =…
-
-1
votes2
answers112
viewsQ: How to create a file within a directory?
import os def main(): checkDir = str(input('Escoha o diretório do arquivo Python: ')) if os.path.exists(checkDir): print('O diretório existe!') print() nameDir = str(input('Digite o nome do novo…
-
2
votes1
answer69
viewsQ: Objective of str()
I’d like to know what role the function plays str() on line 33(code does not work without this function, gives this error: Typeerror: Unsupported format string passed to list.format) jogadores =…
-
0
votes3
answers138
viewsQ: The why of using break
I wanted to know why the use of break in code(I realized that without break, the code is flawed): lista = list() pos = 0 for c in range(0, 5): n = int(input('Digite um valor: ')) if c == 0 or n >…
-
1
votes1
answer554
viewsQ: Calculation of salary needs to limit houses
An employee of a company receives salary increase annually: It is known that: This employee was hired in 1995, with initial salary of R $ 1.000,00; In 1996 he received a 1.5% increase over his…
-
-1
votes2
answers300
viewsQ: Doubt in PA code in Python
Was Doubtful in an exercise resolution in Python. pri_termo = int(input('Digite o primeiro Termo: ')) razao = int(input('Digite a Razão da PA: ')) termo = pri_termo cont = 1 while cont <= 10:…