Password Password Pswd 1 Password 123456 Gr8 Passwds Salary

Passwordpassw0rdpswd1password123456gr8passwdsalary Labin

Password passw0rdpswd1password123456gr8passwdsalary Labin

Password! Passw0rd pswd$ 1Password! 123456 Gr8pass%wd Salary Lab In this lab you are going to write a time card processor program. Your program will read in a file called salary.txt. This file will include a department name at the top and then a list of names (string) with a set of hours following them.

The file I test with could have a different number of employees and a different number of hours. There can be more than 1 department, and at the end of the file the letters “EOF” will be present. An example file: The B Department Bill F1 Bob .08 F3 Betty F2 Brandon F2 Brad F4 The Sales Department Kyle .105 F3 Tyler .085 F3 Konner F2 Sam .045 F3 Kent F4 EOF Last in the row after the hours comes the pay grade (F1, F2, F3, F4). The number of hours recorded is based on the pay grade of the employee. F1 and F2s will have 5 numbers for their hours.

F3s are commission based where a sales amount and a commission percentage is given. F3s are also assumed to work 30 hours if their commission is 10% or below and 40 hours if their commission is above 10%. F4s will have 7 numbers (as they are on-call during the weekend). Each of the pay grades will also have different pay calculations which are as follows: F1 = The total number of hours 10.25 F2 = (The total number of hours – 35) 18.95 + 400 F3 = The total sales amount the commission rate F4 = The first 5 hourly totals 22.55 + Any remaining hourly totals * 48.75 Your output to the screen should start with the department name, followed by the total pay for all of the employees, then the total number of hours, and the total number of employees.

After that you should have a breakdown of each category of employee: F1 total pay and total hours, F2 total pay and total hours… Each department will have at least 1 employee and each department will end in the word “department.” The B Department Total Salary: $##.## Total Hours: ### Total Number of Employees: ## COSC 1436 Fall 16 F1: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## F2: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## F3: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## F4: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## The K Department Total Salary: $##.## Total Hours: ### Total Number of Employees: ## COSC 1436 Fall 15 F1: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## F2: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## F3: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## F4: Total Salary: $##.## Total Hours: ### Total Number of Employees: ## Before coding your solution, take the time to design the program.

What are the possible things that the file can have that you need to anticipate? What are the actions that you need to take (read the file, add up hours…)? Are those actions things that could be placed in separate functions? What about the function – can you guess some of the things that will happen? Such as, using substring to pull out part of a line in the file maybe using stoi to convert a string to an integer to add it to the total or creating variables to hold the employee type you find before passing it to another function.

Finally, how are these functions called, what is the order and what information is passed to and from? Take all of this and write a flow chart to the best of your abilities that will serve as a guide when programming (as well as being turned in for credit). Possible flowcharting options: Word, Dia, Scoring Breakdown 25% program compiles and runs 25% program reads in and calculates the figures for output 25% outputs the correct information in a clear format 25% Flowchart depicting your solution (preferably as an image file like png or pdf) 5% bonus to those who can output the F# responses in a columned output like that shown above. 5% bonus to those who do a chart comparing the data at the end to show the relation between the pay grades and the amount of salary spent in each (they style of chart is up to you and more points may be given for more difficult charts (like a line chart): B Department F F F F K Department F1 - 0 F F F Or event something like this instead: F1 F2 F3 F4 Assignment6: Input and Output Files Write a Python program with a function checkPassw0rd (Note that function name has a zero instead of an o). public String checkPassw0rd( psswd) The password uses the following criteria: · The password should be at least 6 characters strong. · The password should contain at least one upper case letter. · The password should contain at least TWO lower case letters · The password should have at least one digit. · The password should have a special character like $ or ! or %. The function then verifies that it meets the stated criteria. If it does it should return message “Password Accepted”. If not it should return a message as to what is wrong with the password and why it is not accepted. Create a python file passw0rd. The main() should read in the given input file passwdin.txt .

This input file has six passwords. Your main method should read each password and call the above method with each string as the argument and write the password string and the return argument into an output file passwdout.txt. So for example if the first password being read from the input file is Myname!, then in the output file it should say as the first line MyName! – Password is not accepted. Password should have at least one digit.

Paper For Above instruction

The task involves developing a Python program that cross-verifies passwords based on specified security criteria and processes an input file containing multiple passwords. The program is divided into two core components: a function named checkPassw0rd and a main procedure that manages file I/O operations.

Firstly, the checkPassw0rd function accepts a password string and evaluates whether it meets the security standards. The criteria include a minimum length of six characters, at least one uppercase letter, at least two lowercase letters, at least one digit, and at least one special character such as $, !, or %. The function systematically checks each condition, possibly using Python string methods like .isupper(), .islower(), .isdigit(), and the in operator for special characters. If the password passes all the requirements, it returns the message "Password Accepted". Otherwise, it provides feedback on which specific criteria have not been met, explaining the shortcomings.

The main function reads six passwords from an input file named passwdin.txt. For each password read, it calls checkPassw0rd to validate the password and then writes into an output file named passwdout.txt the password followed by the validation result. For example, if the password is "Myname!", and it fails because it lacks a digit, the output should reflect the password and an appropriate message such as "Myname! – Password is not accepted. Password should have at least one digit."

This program effectively demonstrates input/output file handling, string validation, and condition checking in Python, fulfilling the assignment's functional and formatting requirements. Proper exception handling can also be considered to manage file errors, but the core focus remains on validating passwords and reporting findings clearly.

References

  • Python String Methods Documentation. Python Software Foundation. https://docs.python.org/3/library/stdtypes.html#str
  • File Handling in Python. Real Python. https://realpython.com/read-write-files-python/
  • Effective Password Validation Techniques. OWASP. https://owasp.org/www-community/Password_special_characters
  • Introduction to File Input and Output in Python. GeeksforGeeks. https://www.geeksforgeeks.org/file-handling-in-python/
  • Regular Expressions for Password Validation. Python re module. https://docs.python.org/3/library/re.html
  • Python Programming Paradigms. DataCamp. https://www.datacamp.com/blog/overview-of-python-programming-paradigms
  • Best Practices for Secure Password Storage. OWASP. https://owasp.org/www-project-password-special-characters
  • String Validation Techniques. W3Schools Python Tutorial. https://www.w3schools.com/python/python_strings.asp
  • Python File Handling Examples. Programiz. https://www.programiz.com/python-programming/file-input-output
  • Python Conditional Statements. Programiz. https://www.programiz.com/python-programming/if-elif-else