Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

Partb Python

The document summarizes a Python code project that generates random passwords. The code prompts users to input the desired password length and choose character sets. It utilizes Python's random module to select characters randomly from the specified sets, creating unpredictable and complex passwords. The code is lightweight, portable, and offers a convenient way to generate secure passwords tailored to individual preferences while addressing programming concepts and enhancing user experience.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Partb Python

The document summarizes a Python code project that generates random passwords. The code prompts users to input the desired password length and choose character sets. It utilizes Python's random module to select characters randomly from the specified sets, creating unpredictable and complex passwords. The code is lightweight, portable, and offers a convenient way to generate secure passwords tailored to individual preferences while addressing programming concepts and enhancing user experience.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Part – B Micro-Project Report

Title of Micro-Project : Password Gerenator.

1.0 Rationale
The provided Python code facilitates the generation of random passwords with
customizable lengths and character sets. It prompts users to input the desired password
length and choose from digits, letters, and special characters for the password's
composition. The code ensures randomness by utilizing Python's built-in `random` module,
which selects characters from the specified character set. This approach enhances password
security by creating unpredictable and complex passwords. Additionally, the interactive
menu-driven interface enhances user experience and intuitiveness. With no external
dependencies, the code remains lightweight and portable. Overall, it offers a convenient
and flexible solution for generating strong and secure passwords tailored to individual
preferences.

2.0 Aims/Benefits of the Micro-Project

1. Dynamic Password Generation.


2. Customizable character set
3. Interactive user experience
4. Randomness and Security
5. No External Dependencies

3.0 Course Outcomes Addressed

1. Display message on screen using python script on IDE.


2. Develop python program to demonstrate use of operator.
3. Perform operation on data structure in python.
4. Develop function for given problem

C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx
4.0 Literature Review

o The provided Python code offers a simplistic yet effective solution for generating random
passwords with customizable lengths and character sets. It demonstrates an understanding
of fundamental programming concepts and leverages Python's built-in capabilities to
achieve its objective.

o The code's strength lies in its interactive nature, which guides users through the password
generation process by prompting them to input the desired length and select from various
character sets. This interactive approach enhances user experience and ensures that the
generated passwords meet specific requirements.

o Furthermore, the code demonstrates good programming practices by utilizing


modularization and abstraction. It encapsulates the password generation logic within
functions, promoting code reuse and readability.

o However, the code could benefit from additional error handling to address potential user
input errors or edge cases. For instance, incorporating validation checks to ensure that the
user enters a valid length for the password and handles invalid menu selections gracefully
would enhance the robustness of the program.

o Overall, the code serves its purpose well by providing a straightforward and accessible
solution for generating random passwords. With minor enhancements to error handling and
user feedback, it could further improve its usability and reliability.

1.0 Actual Methodology Followed.

First of all we collected the information which is required for our micro project
from internet facilities, reference books and our subject teacher. We used Google and Wikipedia
facilities for collecting necessary information. We searched information about how to build
online medical store shopping system . During the process, we searched information about
Medical store and tablets mans which types of tablet are daily uses for customer those tablets are
stocked are big. It help the customer to find their tablets easily on online . It solved our
difficulties to complete the project. Then we gathered and analyzed all the information. And we
make chart related to all this information.

Passwords are a means by which a user proves that they are authorized to use a device. It is
important that passwords must be long and complex. It should contain at least more than ten

C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx
characters with a combination of characters such as percent (%), commas(,), and parentheses, as
well as lower-case and upper-case alphabets and numbers. Here we will create a random
password using Python code.

string – For accessing string constants. The ones we would need are –

string.ascii_letters: ASCII is a system that is used to represent characters digitally, every


ASCII character has its own unique code. string.ascii_letters is a string constant which
contains all the letters in ASCII ranging from A to Z and a to z. Its value is non-locale
dependent and it is just a concatenation of ascii_uppercase and ascii_lowercase. Thus it
provides us the whole letter set as a string that can be used as desired.
string.digits: This is a pre-initialized string that contains all the digits in the Arabic
numeral system i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. It should be kept in mind that even though
these are digits, the type is still a string constant, and all digits are concatenated like this –
“0123456789”. If we want to access specific numbers then we can do so using slicing.
string.punctuation: Apart from letters and digits, python also provides us all the special
characters in a pre-initialized string constant. These include various kinds of braces,
logical operators, comparison operators, arithmetical operators as well as punctuation
marks like commas, inverted commas, periods, exclamations marks, and question marks.
The whole string is – !”#$%&'()*+, -./:;<=>?@[\]^_`{|}~

6.0 Actual Resources Used

S. No. Name of Resource/material Specifications Qty Remarks


1 Computer system 4 GB RAM, 64 beats Microsoft 1 Used for
office 2007, 500 GB hard disk, operating given
I3processer software
2 Internet facilities We have used google

3 Reference book

7.0 Source Code

# import modules
import string
import random

# store all characters in lists


s1 = list(string.ascii_lowercase)
s2 = list(string.ascii_uppercase)

C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx
s3 = list(string.digits)
s4 = list(string.punctuation)

# Ask user about the number of characters


user_input = input("How many characters do you want in your password? ")

# check this input is it number? is it more than 8?


while True:

try:

characters_number = int(user_input)

if characters_number < 8:

print("Your number should be at least 8.")

user_input = input("Please, Enter your number again: ")

else:

break

except:

print("Please, Enter numbers only.")

user_input = input("How many characters do you want in your password? ")

# shuffle all lists


random.shuffle(s1)
random.shuffle(s2)
random.shuffle(s3)
random.shuffle(s4)

# calculate 30% & 20% of number of characters


part1 = round(characters_number * (30/100))
part2 = round(characters_number * (20/100))
C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx
# generation of the password (60% letters and 40% digits & punctuations)
result = []

for x in range(part1):

result.append(s1[x])
result.append(s2[x])

for x in range(part2):

result.append(s3[x])
result.append(s4[x])

# shuffle result
random.shuffle(result)

# join result
password = "".join(result)
print("Strong Password: ", password)

8.0 Outputs of the Micro-Projects

How many characters do you want in your password? 3


Your number should be at least 8.
Please, Enter your number again: 8
Strong Password: 4uN:[1Uk

How many characters do you want in your password? 12


Strong Password: Oh1>mrQYH/6e

C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx
9.0 Skill Developed / Learning outcome of this Micro-Project

• Technical Proficiency: Engaging with coding exercises, projects, and challenges helps
individuals develop technical proficiency in programming languages, algorithms, and data
structures.

• Problem-Solving Skills: Working on coding problems and projects sharpens problem-


solving abilities, fostering analytical thinking, creativity, and logical reasoning.

• Collaboration and Communication: Participating in coding communities, forums, and


group projects enhances collaboration and communication skills by encouraging
interaction with peers, sharing knowledge, and seeking feedback.

• Adaptability and Resilience: Overcoming coding challenges and debugging errors


cultivates adaptability and resilience, as individuals learn to navigate setbacks, iterate on
solutions, and persist in the face of obstacles.

• Continuous Learning and Growth: Embracing a growth mindset and actively seeking out
new coding challenges, technologies, and tools fosters continuous learning and personal
growth, enabling individuals to stay updated and adaptable in a rapidly evolving tech
landscape.

9.0 Applications of this Micro-Project

• User-Centric Design: The code prioritizes user experience by offering an interactive


interface, allowing users to specify password length and character sets according to their
preferences.

• Enhanced Security: By leveraging randomness in password generation and offering a wide


range of character sets, the code facilitates the creation of strong and secure passwords,
crucial for safeguarding sensitive information.

• Modularization and Abstraction: The code demonstrates good programming practices by


modularizing the password generation logic into functions, promoting code reuse,
readability, and maintainability.

C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx
• Usability: With its menu-driven approach, the code simplifies the password generation
process, making it accessible even to users with minimal programming knowledge.

• Flexibility: Users have the flexibility to choose the length and composition of the generated
passwords, allowing for customization based on specific requirements or security policies.

• Efficiency: The code efficiently utilizes built-in Python modules (string and random),
eliminating the need for external dependencies and ensuring portability across different
environments.

• Documentation and Clarity: While concise, the code is well-commented and clear,
enhancing readability and understanding for both users and developers.

• Error Handling: Although rudimentary, the code could benefit from additional error
handling mechanisms to address potential user input errors or edge cases, ensuring
robustness and reliability.

**************

C:\Users\LENOVO\Desktop\In-plantTrainingFormats\Assessment_Manual_25thMay.docx

You might also like