pirate-batch-processing-situation

Questions ArchiveCategory: Questionspirate-batch-processing-situation
Cindi asked 2 years ago

So on the pirate batch processing assignment to put the numbers of kills and booty next to the pirates name it seems like there should be some sort of matching function or something. I used if them statements to make  it search through all the names and find a match but idk I feel there should be an easier way because it took a long time to go through all 47 names for each entry….

1 Answers
Shayna answered 2 years ago

If Then statements are fine, but if you want to make it “more efficient” (it’s not really that much more efficient), you can exit the if statement when the program finds the captain name. For more help, definitely ask the TAs, but if then statements should be fine. I am also assuming you’re not writing all 47 names in your code.

Your Answer

3 + 20 =

css.php