Writing Pseudocode Algorithms & Examples Assignment

Added on - 16 Sep 2019

  • Dissertation


  • 5


  • 1037


  • 50


  • 0


Showing pages 1 to 2 of 5 pages
Given the problem statement below, complete the followingProgram schedule chartDetailed algorithm written in English / pseudocodeTest planProgram that runs correctly In order to receive credit, your code MUST run and complete at leastsome of the steps; comment out the code that shows your attempt but does not workCoding style and commentsomeaningful identifiers, indentation, etc.oheader comment with your name and course info at the top of the fileocomments explaining your codealgorithm as a flowchartProblem statementFor this program, you are to help US Department of Homeland Security determine potential unwantedindividuals at the next United Nations conference scheduled in New York City. The US office received anencrypted list of ill-intentioned people who may want to show up to the conference and needs to be ableto match the names on this list to the names of actual attendees. The problem that they are facing is thatthey managed to only partially decrypt the names of potential troublemakers. The decryption process istaking a long time and the conference is about to begin. You need to write a program that matches the listof partially decrypted names to the names of actual attendees and generate a report that shows matchingpercentages between the names on both lists.While solving this problem, you maynotuse Python constructs that have not been discussed in class sofar.InputYou will be given two lists with names: one with all conference attendee names and another with thepartially decrypted names of unwanted individuals. You will need to ask the user running your programfor the specific filenames, but what we do know is that each file will be saved as a txt file, with one nameper file line. All names will be written in uppercase characters and consist of two main parts separated byone blank character: the first name and the last name.There are two sample test files provided for you. They are calledattendees.txtandthreatlist.txt.This is the sample run of the beginning of the program (yellow highlighting indicate possible user input):Enter the name of the file with attendees names:attendees.txtEnter the name of the file with suspect names:threatlist.txt
MatchingIn order to match a name from the partially decrypted list, you must compare it character by character,against all of the names on the conference attendee list. For each name on the decrypted list, determineif there is a match in the list of conference attendees within a certain percentage level. The percentagelevels that will need to be appear in the report are:Perfect matchesMatches in the range [90, 100)Matches in the range [80, 90)Matches in the range [70, 80)The actual percentage level for two names is calculated as the number of exact character matches, byposition, in the overall length of a string. Matches for the first name are calculated separately from thematches for the last name, and then added up together. There are also two characters that count aspartial matches:@symbol that matches a vowel counts as 0.75 match$symbol that matches a consonant counts as 0.5 matchHere are some examples:Decrypted NameConference AttendeePercentageLevelNoteBEN SMITHBEN SMITH100Perfect MatchB@N SMITHBEN SMITH[90, 100)7.75 character match out of 8B@N $MITHBEN SMITH[90, 100)7.25 character match out of 8B@# SM*THBEN SMITH[70, 80)5.75 character match out of 8$%# SMI^HBEN SMITH4.5 character match out of 8FRANK SMITHBEN SMITH5 character match out of 10BEN SMITHBENJAMIN BLACKSMITH3 character match out of 18OutputYour program has to generate a report as a csv file, calledmatches.csv. The report has to contain allnames that appear on the partially decrypted list, and their percentage matches to actual attendees.Examine and follow the format of the provided sample output file,matches.csv.In addition, count and print all perfect and [90, 100) matches to the screen as follows:**************************************************> 90% MATCHThreat: B@N SMITHAttendee: BEN SMITH****************************************************************************************************PERFECT MATCHThreat: BEN SMITHAttendee: BEN SMITH****************************************************************************************************
You’re reading a preview

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document