[Tutor] (no subject)
shawn taylor
shtlor at yahoo.com
Sun Dec 11 23:30:16 CET 2011
How do I do this
Password Generator
For this assignment, you will generate usernames and passwords for your school. The passwords have to be secure and based on information provided by the parents at registration.
1) Write a program that will prompt the user for
FirstName LastName IDNumber BirthDay
2) generate the student’s username and password.
3) Test to see if the password and username works.
RULES FOR GENERATING PASSWORD AND USERNAME
The username is fairly straightforward it is composed of the student’s initials follow by the idnumber
Username = <First letter of firstname> + <first letter of lastname> + <idnumber>
The password is much more difficult.
Step 1 – pick the middle letter of the student’s first name.
Step 2 – pick the middle letter of the student’s last name.
Step 3 – Add all the digits in the student’s birthday. Keep adding until you get a single digit.
Step 4 – Add all the digits in the student’s idNumber. Keep adding until you get a single digit.
Step 5 – Multiply the month * day * year and divide by 17.
Step 6 – Multiply the first 2 digits of the idNumber by the last 3 digits of the idNumber / 7
Step 7 – Multiply Step 5 by Step6
Step 8 – Combine into a password
Password = Concatenate (<Step1> + <step3> + <Step4>+<Step7 > + <Step2>)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111211/fdf9f18c/attachment.html>
More information about the Tutor
mailing list