Write a program that asks the user to enter in a username

Assignment Help Python Programming
Reference no: EM132356999

Assignment

For this assignment you will be writing a series of programs that should be stored in their own "py" files. The filenames you should use are listed at the end of each part. When you're finished you should submit your program to the Assignment category inside of NYU Classes.

Part 1a

You have been asked to write a username validation program for a small website. The website has specific rules on what constitutes a valid username, including:

•All usernames must be between 8 and 15 characters long

•Usernames can only contain alphabetic (a-z and A-Z) and numeric characters (0-9) - no special characters or spaces are allowed.

•The first and last characters in a username cannot be a digit

•Usernames must contain at least one uppercase character

•Usernames must contain at least one lowercase character

•Usernames must contain at least one numeric character

Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above.

Part 1b

The company you are working for was very happy with your username validator, and now they want you to write a password validator for their website. Here are the rules for passwords:

• Passwords must be at least 8 characters long (but they do not have an upper limit)

• Passwords cannot contain the user's username (i.e. if the username is "My1stUsername" the password cannot be "abcMy1stUsername" or "My1stUsernameABC" because the username can be found inside of the password String)

• Passwords must be a mixture of uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and a select number of special characters (#, $, % and &). The password must contain at least one of each of these types of characters in order to be valid.

You can make a copy of Part 1a and place your password validator code directly after your username validator. Here's a sample running of the program. Note that you need to continually ask the user for a password until they supply a good one.

Part 2a

Numerology is the "study of the purported mystical or special relationship between a number and observed or perceived events." It has been used throughout human history as a way to attach meaning to a name, object or event using mathematics. It is considered a "pseudoscience" by modern scientists since it has no basis in observable phenomena. With that said, it makes a great programming challenge so we're going to go with it! :)

What you want to do for this project is to ask the user to type in their name. Next, you will need to use a technique called "theosophical reduction" to convert their name into a number. With this technique we assign each letter of the alphabet its own number. For example, the letter "a" is equal to the number 1. "b" = 2, "c" = 3, "z" = 26, etc. You should ignore non-alphabetic characters (i.e. numbers, spaces and special characters)

Once you've gotten all of the letters converted into numbers you can add them up into one single number. This is the "numerology number" for the name that the user entered.

Part 2b

Classic numerology ascribes meaning to the following numbers:

•0 = emptiness, nothingness, blank

•1 = independence, loneliness, creativity, originality, dominance, leadership, impatience

•2 = quiet, passive, diplomatic, co-operation, comforting, soothing, intuitive, compromising, patient

•3 = charming, outgoing, self expressive, extroverted, abundance, active, energetic, proud

•4 = harmony, truth, justice, order discipline, practicality

•5 = new directions, excitement, change, adventure

•6 = love, harmony, perfection, marriage, tolerance, public service

•7 = spirituality, completeness, isolation, introspection

•8 = organization, business, commerce, new beginnings

•9 = romatic, rebellious, determined, passionate, compassionate

However, you might recall from the previous problem that the sample input ("craig") reduced to the number 38. 38 is not on the "personality trait" lookup table above, so we need to further reduce the number by adding up its individual digits.

Part 3a

For this part you will be writing a series of functions that can be used as part of a "secret message encoder" program. Here are the functions you will be writing as well as some sample code that you use use to test your work.

Part 3b

Now you are going to write an "encoder / decoder" program that makes use of your three cryptographic functions. Begin by writing a program that continually asks the user to enter in an option - the user can either (e)ncode a word, (d)ecode a word or (q)uit the program.

If the user chooses to encode a word you should do the following:

•Ask the user for a positive number between 1 and 5. Reprompt them if necessary.

•Next, ask them to enter in a phrase that they want to encode.

•Finally, apply the following algorithm to their word:

oAdd 'num' random characters in between each letter of their word (using your add_letters) function

oShift the word 'num' characters (using your shift_characters function)

If the user chooses to decode a word you should do the following:

•Ask the user for a positive number between 1 and 5. Reprompt them if necessary.

•Next, ask them to enter in a phrase that they want to encode.

•Finally, apply the following algorithm to their word:

oSubtract 'num' random characters in between each letter of their word (using your remove_letters) function

oShift the word DOWN by 'num' characters (using your shift_characters function)

Part 4

For this part you will be implementing a series of commonly used String functions and methods by writing your own functions. These functions should behave just like their commonly used counterparts.

Reference no: EM132356999

Questions Cloud

Implications impacting the agency current employment trend : Analyze and describe the implications impacting the agency's current employment trend, growth, and delivery of its products and services.
Write a program that lets the user enter nonnegative integer : Write a program that lets the user enter a nonnegative integer and then uses a loop to calculate the factorial of that number.
Produce a project plan for a suitable project : SHR039-6 - Operations and Project Management - University of Bedfordshire Business School - produce a project plan for a suitable project for your work-place
Cognitive effects of risperidone in children with autism : Cognitive Effects of Risperidone in Children with Autism and Irritable Behavior. Evaluate article and critique the statistical analysis employed in the study.
Write a program that asks the user to enter in a username : Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules.
Document eight major changes in leadership thinking : Document eight major changes in leadership thinking, learning, and strategy that occurred at Nike that contributed to their long-term success.
How can unethical behavior affect an organization : How can unethical behavior affect an organization? Please give a detailed explanation.
Run grow transform framework : How does the Customer relationship management fit into the Run Grow Transform Framework?
How might the use of critical thinking : How might the use of critical thinking affect other social interactions, such as those related to politics and being a consumer?

Reviews

Write a Review

Python Programming Questions & Answers

  In this assignment you will write a program that does

in this assignment you will write a program that does simple packet routing. your program will take three command-line

  Create a program to determine which exact locker numbers are

Create a program to determine which exact locker numbers are open, and total number that are open. You are not allowed to use Python function count.

  Create a program that asks the user to enter a string

Create a program that asks the user to enter a string that is temporarily stored in variable x. The program should use a method to know if the entered value.

  You will define an operation on positive integers called

you will define an operation on positive integers called twiddle which consists of summing the squares of the digits of

  Write a python program that generates a small web site

Choose a sport or club, and get some suitable input data.. If you play a sport yourself, see if you can get some data files for your sport.

  Implement a complete version of a hash table

FIT1008 - Intro to Computer Science - Implement a complete version of a hash table using Linear Probing to resolve collisions and implement dynamic hashing

  What python ides are being used in the industry

An IDE is an Integrated Development Environment. It is the application used to create applications and code. What Python IDEs are being used in the industry?

  What do we do to keep the compiler from confusing a float

What is the shortest form of sum = sum + 1; or sum += 1; where 1 is always the increment value? What do we do to keep the compiler from confusing a float.

  Describe what it actually does when called with a string

Describe what it actually does when called with a string argument. If it does not correctly check for lowercase letters, give an example argument.

  Write a python program for two players to play a rock-paper

Write a Python program for two players to play a rock-paper-scissors game.The program first asks player 1 to enter r for rock, p for paper or s for scissors.

  Permutation ciphers

Permutation Ciphers (a.k.a. Transposition Ciphers) are another class of simple cryptosystems. For this we use the functions apply(.,.) and inv(.) from Homework 4; copy these two functions into your le as auxiliary functions.

  Construct a function named intersperse that will prompt user

Construct a function named intersperse that will prompt the user to enter two sentences. Then it will print a combined sentence, consisting of alternating words

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd