Python project for practice

Python project for practice:

1. Acronym converter Function

def acronyms_Converter(acronym_string):
acronyms_list= acronym_string.split()
acronyms = ""
for strval in acronyms_list:
acronyms += str(strval[0]).upper()
print(acronyms)


acronym_string = input("Enter the string for acronym conversion\n")

acronyms_Converter(acronym_string)

2. Story Maker 

import random
when = ['फार पूर्वी', 'काल', 'काल रात्री', 'खूप वर्षांपूर्वी','1 जानेवारी रोजी', 'संध्याकाळी']
who = ['एक ससा', 'एक लांडगा', 'एक मांजर', 'एक कासव','एक उंदीर']
residence = ['आटपाट नगर मध्ये','गुहे', 'बोगद्यात', 'झाडावर', 'नदीच्या मागील बाजूस']
went = ['सिनेमा', 'विद्यापीठ','परिसंवाद', 'शाळा', 'बाग']
happened = ['खूप मित्र बनवले','एक वडा पाव खाल्ला', 'एक गुप्त चावी सापडली', 'एक गुंता सोडवला', 'एक पुस्तक लिहिले']
print(random.choice(when) + ', ' + random.choice(who) + 'जो राहत होता, ' + random.choice(residence) + 'कडे गेला ' + random.choice(went) + ' and ' + random.choice(happened))

3. Password generator-1

import random
list_characters = [chr(i) for i in range(33,127)]
charater_count=int(input("Enter number of characters require
for password : \n"))

def random_pass(charater_count):
password = ""
for i in range(charater_count):
password = password+ str(random.choice(list_characters))

print(password)

random_pass(charater_count)

4. Password generator-2

import random
list_characters = [chr(i) for i in range(33,127)]
passlen=int(input("Enter number of characters require
for password : \n"))

password = "".join(random.sample(list_characters,passlen))
print(password)

5. OTP generator-1

import random
list_1_9 = ['1','2','3','4','5','6','7','8','9']
passlen=int(input("Enter number of characters require
for password : \n"))

OTP = "".join(random.sample(list_1_9,passlen))
print(OTP)

6. OTP generator-2

import random

print("Your OTP is \n", random.randint(0,10), random.randint(0, 10),
random.randint(0, 10),random.randint(0, 10))

7. QR Code generation

import pyqrcode
s = "This Text is sample for QR Code generation"
url = pyqrcode.create(s)
url.svg("QRCode.svg", scale = 5)

8. Email Id and domain slicer

email_id = input("Enter the email id for slicing : \t")

def emailSlicer(email_id):
email=email_id.split("@")
print("Email id is :"+str(email[0])+ " And your domain name is "+ str(email[1]))

emailSlicer(email_id)

9. 

10. 


Comments

Popular posts from this blog

Consultancy information

HEADLESS PYTHON SELENIUM WORKING