QuestionQuestion

Part I

Coding Styles
1. Place a comment block out the top of the Python program. Include the following:
    a. <your name>
    b. Lab 2 – New Password.
Requirements
1. When the program starts, display a message stating what the program will do.
2. The user will enter the current password. Check it against a constant that’s in your code.
    a. If it matches, move on to next part.
    b. If does not match, ask user to try again.
    c. Thy get 4 invalid attempts before the program displays a locked message, and exits.
3. Once valid password is entered, ask user to create a new password.
4. Have them type in the new password twice, to confirm they typed it in correctly.
5. Compare the two passwords.
    a. If they match continue to the next step.
    b. If they don’t match make them type the new passwords in again.
6. Once the new passwords match, the password must meet these restrictions.
    a. Must have at least 8 characters and no more than 16 characters.
    b. Must have at least 1 special character, which are: !@#$%^&*().
    c. Must have at least 1 upper case alphabetic character.
    d. Must have at least 1 lower case alphabetic character.
7. If the criteria is not met, display message stating the new password is invalid and has not been changed.
8. Test program out thoroughly.

Part II

Requirements
• main() function that calls 3 math type functions.
    o CaclBasic Math()
    o CalcPythagoreanTheorem(a, b)
    o CalcQuadFormula (a, b, c)
• CalcBasicMath ()
    o This function will ask user for for real numbers.
    o Those real numbers will be used to add, subtract, multiply, and divide.
    o This function will print out the answers.
• CalcPythagoreanTheorem (a, b)
    o Two real numbers are passed to this function.
    o Perform the calculation and return the result back to the caller.
    o Negative values will be accepted, since they are squared.
• CalcQuadFormula (a, b, c)
    o Three real numbers are passed to this function.
    o This function will return a list. The contents of this list are described below.
    o Before doing the calculations, it will check for:
           Zero as a denominator.
           Negative value under the radical.
    o If either of these two checks are bad, return:
           In index [0] of the list, the Boolean value False.
           In index [1] of the list, place the error message that can be displayed.
    o If the data, passed in, is acceptable, perform the positive and negative calculation:
    o If the list box, put the following:
           In index [0], Boolean value True.
           In index [1], the result of the positive calculation.
           In index [2], the result of the negative calculation.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

"""
   
    <your name>
    Lab 2 - New Password
"""

secret = "123456"

print("This program tells you if the passwords you enter matches.")

attempts = 4
passed = False
while True:
   
    if attempts < 4:
       password = input("Please enter a passoword again: ")
    else:
       password = input("Please enter a passoword: ")

    if password == secret:
       passed = True...

By purchasing this solution you'll be able to access the following files:
Solution1.py and Solution2.py.

$33.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats