+ 4
Help me in python
I need to add a password generator help me solve here is my code https://code.sololearn.com/cIRpAlMXcV4h/?ref=app
39 odpowiedzi
+ 6
What problems you got, the code works correctly
+ 3
Help me to do this I know lists but........................................show me
+ 3
Ananiya Jemberu
How do I shuffle do a demo code
+ 3
Ananiya Jemberu
Thanks
But please show a code
I don't know how to place
+ 1
There is no problem
I mean help me to add a password generator
+ 1
Hi
+ 1
After you click on run option , an dialog box will appear type any name in that , the project will work! Make sure the name is valid
Hope this helps you!
#check my projects for more info!
+ 1
import random
length=int(input('Length of password='))
lower = 'abcdefghijklmnopqrstuvwxyz'
upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
num = '1234567890'
symbols = '!@#$%^&*()_+-=/?'
all = lower + upper + num + symbols
temp = random.sample(all,length)
password=''.join(temp)
print(password)
+ 1
abc 123 since you're just concatenating them all together anyways, why not just make one variable with all available characters?
You're also redefining the builtin "all", which is something you shouldn't do, unless you know what you're doing and intend on doing so.
Sample is also a bad choice here, as it only returns items from the list, without repeating. That narrows down a lot of what each character CAN be, and open to brute force attack. It also lacks for future feature implementation.
0
Hint: use random store it as a list then shuffle it
0
What if the person's name is Jane or Kate or a four letter noun
I suggest you use >=4
name = str(input())
if (len(name) >= 4):
print("welcome " + name)
print("HERE IS YOUR DATA")
print("name:" + name)
else:
print("INVALID NAME")
0
Eg
```python
random.shuffle(list("%","quot;,"*",1,2,3,4,5, 6)
```
0
Codemurai Before you can make a password generator, you need to define the rules of the password. How many characters does it need to be? Is it just alpha/alpha-numeric, or are symbols involved. Can it start with any letter/number/symbol, or does it have to start with a letter/numer? Does at least one character have to be capitalized? Then, you can build the generator.
0
Hi
0
https://code.sololearn.com/WM0KCdES01lY/?ref=app
https://code.sololearn.com/WzMGU3BAdHA4/?ref=app
https://code.sololearn.com/W6Hc85r3r0lM/?ref=app
https://code.sololearn.com/W4Ac5WcPSfvd/?ref=app
https://code.sololearn.com/WUmcrKMavUCS/?ref=app
https://code.sololearn.com/WZYJ85hgF8Yc/?ref=app
https://code.sololearn.com/W1BWHeyQZ2j3/?ref=app
https://code.sololearn.com/W2VO6v9tsyqh/?ref=app
0
there is no problem in the code above?
0
Hi guys il having trouble completing question 3.1 in python
0
Here's a sample for a password generator, lowercase, with a length of 10.
from string import ascii_lowercase
from random import choice
def generate(length: int) -> str:
passwd = [choice(ascii_lowercase) for i in range(0x0, length)]
return "".join([p for p in passwd])
print(generate(10))
0
Hello