Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Quick_sort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

import sys
A=[]
g = int(input("Enter number of elements : "))

for i in range(0, g):
ele = int(input())

A.append(ele)
print(A)

for i in range(len(A)):


min_idx = i
for j in range(i+1, len(A)):
if A[min_idx] > A[j]:
min_idx = j

A[i], A[min_idx] = A[min_idx], A[i]


print ("Sorted array")
for i in range(len(A)):
print("%d" %A[i]),
22 changes: 22 additions & 0 deletions random password generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import random
import string

x=int(input("Enter the length of the password (minimum 4)"))
x=x-4
def get_random_password():
random_source = string.ascii_letters + string.digits + string.punctuation
password = random.choice(string.ascii_lowercase)
password += random.choice(string.ascii_uppercase)
password += random.choice(string.digits)
password += random.choice(string.punctuation)

for i in range(x):
password += random.choice(random_source)

password_list = list(password)
random.SystemRandom().shuffle(password_list)
password = ''.join(password_list)
return password

print("First Random Password is ", get_random_password())
print("Second Random Password is ", get_random_password())