2 Show Code Write Portion Computer Program Language Generate Print Six Lowercase Letter Q37166769

2. Show your code for a.

a. Write a portion of a computer program (in any language) thatwill generate and print all six lowercase letter passwords.

b. How many passwords does this generate?


Answer


import random

m = “abcdefghijklmnopqrstuvwxyz”
plen = 6
p = “”.join(random.sample(m,plen))
print(p)

Python 3.7.0 Shell File Edit Shell Debug Options Window Help Python 3.7.0 (3.7.0:lbf9cc5093, Jun 27 2018, 0:59:51) [MSC 7.191

The number of permutations of n distinct objects taken r at a time, denoted by Pn 1, where repetitions are not allowed, is gi

if you have any doubt then please ask me without any hesitationin the

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.