Project 2 Full Documentiation

docx

School

American River College *

*We aren’t endorsed by this school

Course

310

Subject

Computer Science

Date

Jun 26, 2024

Type

docx

Pages

7

Uploaded by DeanWillpower1764

Report
Project 5: Full Documentation Following the Fundamentals of algorithmic problem solving 1. Ascertaining the capabilities of the Computational device (computer) - Sequential algorithms - Parallel algorithms 2. Understand the Problem 3. Choosing between exact & Approximate Problem Solving 4. Algorithm Design Technique 5. Designing an Algorithm and Data Structure - Algorithms + Data Structures = Programs 6. Methods of Specifying Algorithm 7. Proving an Algorithm is Correct 8. Analyzing an Algorithm 9. Coding an Algorithm Ascertaining the capabilities of the computational device Our team chose a sequential algorithm for our program application because our application would be step by step. Understand the Problem Application will receive input and output whether or not student is admitted into RN program Whether or not a student is admitted is based on 5 Criteria we pulled from the Sac City RN program Applicants will be awarded points out of 100 based on answers to criteria. Applicants need a score of 70 to be admitted into the RN program at Sac City Applicants will also be ranked against other applicants. 5 Criteria 1. Does applicant have an AA degree or Higher a. Yes or no, if yes the applicant will earn 15 points 2. Does the applicant have a relevant health care certification a. We will list out relevant certifications, if applicable applicant will earn 15 points b. Only one certification will score points, more certifications will not score more points i. Examples relevant certifications: Currently licensed LVN, Paramedic, EMT, etc… 3. Does the applicant fall under any special circumstances? a. We will list out special circumstances in which the applicant can only choose one to receive 10 points
i. Examples of special circumstances: disabilities, low family income, refugee status 4. What is the applicants GPA? a. Applicant will receive points out of 30 based on GPA i. 0-2.49 = 0 points ii. 2.5-2.99 = 15 points (minimum to receive points) iii. 3.0-3.49 = 20 points iv. 3.5-3.749 = 25 points v. 3.75-4 = 30 points (maximum) 5. What is the applicants score on the TEAS (Test of Essential Academic Skills) a. Applicant will receive points out of 30 based on TEAS score i. 0-61.99 = 0 points ii. 62-69.99= 15 points (minimum to receive points) iii. 70-79.99 = 20 points iv. 80-89.99 = 25 points v. 90-100 = 30 points(maximum) Choose between exact and approximate problem solving. Our team chose exact problem solving because of the nature of our application where you would receive points based off the answer of each criterion. Fundamentals of algorithmic problem solving steps 4-9 on the next page
Steps 4-8 Our team used a tree data structure for the basis of our program. A copy of the png will be provided in the submission.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Coding the Algorithm There are three programs used for out application - Application.py - View rankings.py - Clear database. Py Application,py This is our main program where we will enter our applicant’s data in a step by step manner to be scored and ranked in our database based off their answers to our criterion. View rankings. Py This is the program that will store each applicant’s email, full name, rank and score after their data is entered into application.py Clear database.py This is the program that will clear the view rankings.py database for a new set of applicants to be entered, Program: Application import shelve import re def main (): input ( 'Welcome to the Sac City Nursing School application. \n\n Press the enter key to begin. \n ' ) while True : firstName = input ( ' \n Please enter your name (first): ' ) if re . fullmatch ( '[A-Za-z]+[A-Za-z ]*' , firstName ): break print ( ' \n Invalid response. Please enter only your first name.' ) while True : lastName = input ( ' \n\n Please enter your name (last): ' ) if re . fullmatch ( '[A-Za-z]+[A-Za-z0-9 ]*' , lastName ): break print ( ' \n Invalid response. Please enter only your last name.' ) while True : email = input ( ' \n\n Please enter your email: ' ) if re . fullmatch ( r ' [ _A-Za-z ] + \w * @ [ \w ] + ( \. \w + ) + ' , email ): break
print ( ' \n Invalid response. Please enter a valid email. Example: user123@mail.mail' ) with shelve . open ( 'database' ) as database : if email in database : while True : proceed = input ( ' \n\n You have already submitted an application. Would you like to submit a new one and overwrite the old one? \n\n ' ) if proceed == 'yes' or proceed == 'no' : break print ( ' \n Invalid response. Please enter "yes" or "no" (without "").' ) if proceed == 'no' : print ( ' \n Thank you for your interest in the application.' ) return score = 0 while True : AADegree = input ( ' \n\n Do you have an AA degree or higher? \n\n ' ) if AADegree == 'yes' or AADegree == 'no' : break print ( ' \n Invalid response. Please enter "yes" or "no" (without "").' ) if AADegree == 'yes' : score += 15 while True : certifications = input ( ' \n\n Do you have certifications from the following list? \n\n Currently licensed LVN, Paramedic, Respiratory Therapist, \n Occupational Therapy Assistant, Physical Therapy Assistant, Certified CNA, EMT, \n Psych Technician, Medical Assistant, Physician Assistant \n\n ' ) if certifications == 'yes' or certifications == 'no' : break print ( ' \n Invalid response. Please enter "yes" or "no" (without "").' ) if certifications == 'yes' : score += 15 while True : special = input ( ' \n\n Do any of the following special circumstances apply to you? \n\n disabilities, low family income, first generation to
attend college, \n need to work, disadvantaged social or educational environment \n\n ' ) if special == 'yes' or special == 'no' : break print ( ' \n Invalid response. Please enter "yes" or "no" (without "").' ) if special == 'yes' : score += 10 while True : gpa = input ( ' \n\n What is your GPA? \n\n ' ) if re . fullmatch ( r ' [ 0-5 ]( \. [ 0-9 ] + ) ? ' , gpa ): break print ( ' \n Invalid response. Please enter only your GPA. Example: 3.2' ) gpa = float ( gpa ) if 2.5 <= gpa < 3 : score += 15 elif 3 <= gpa < 3.5 : score += 20 elif 3.5 <= gpa < 3.75 : score += 25 elif 3.75 <= gpa : score += 30 while True : teas = input ( ' \n\n What is your TEAS score? \n\n ' ) if re . fullmatch ( '0*(100|[0-9]{0,2})' , teas ): break print ( ' \n Invalid response. Please enter only your TEAS score (0- 100).' ) teas = float ( teas ) if 62 <= teas < 70 : score += 15 elif 70 <= teas < 80 : score += 20 elif 80 <= teas < 90 : score += 25 elif 90 <= teas : score += 30 print ( ' \n\n Thank you for completing the application. \n ' ) database [ email ] = { 'firstName' : firstName , 'lastName' : lastName , 'score' : score }
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
main () Program: View Rankings import shelve with shelve . open ( 'database' ) as database : applicantList = [{ 'email' : email , 'fullName' : database [ email ][ 'firstName' ] + ' ' + database [ email ][ 'lastName' ], 'score' : database [ email ][ 'score' ]} for email in database ] if len ( applicantList ): applicantList . sort ( key = lambda e : e [ 'score' ], reverse = True ) for i , e in enumerate ( applicantList ): print ( f 'rank: { i + 1 :<5} name: { e [ "fullName" ] :<20} email: { e [ "email" ] :<20} score: { e [ "score" ] :<3} ' ) else : print ( 'no applicants in database' ) Program: Clear Database import shelve database = shelve . open ( 'database' , flag = 'n' ) database . close () print ( 'database has been cleared' )