On 11/12/11 22:30, shawn taylor wrote:
How do I do this

Read the assignment, it tells you exacvtly what you need to do.
Now which bit of it do you not understand?

Can you do step 1 - read the name, id and birthday?

Can you generate the user name?

As a hint you might want to write some helper functions to:

getInitials(first,last)
getMiddleLetter(aString)
addDigits(aNumber)



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.

This is a bit confusing since I always get a single digit
at the first digit?
And if the student was born  on the 9/9/1999 the total is
more than one digit. So should we then sum the digits of
the total?
ie.
9/9/1999 -> 46 -> 10 -> 1?

It's a badly worded requirement.

Step 4 – Add all the digits in the student’s idNumber. Keep adding until
you get a single digit.

Same problem here

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>)

Ask a specific questuion and you will get specific help.
Show us some code that you've written and you will get more help.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to