DEV Community

Cover image for Codecademy: Recommendation Program Project
spookywookie73
spookywookie73

Posted on

Codecademy: Recommendation Program Project

The 'why'

The next project in the Codecademy Computer Science course is to create a basic recommendation program to run in your terminal.

The Program

When you run the code, you can find the code on my github page here,
you will see a welcome screen, and will be given a list of companies to choose from.

The Project Objectives

Store data in a data structure:
def create_company_linkedlist():
company_list = LinkedList()
for company_name in consoles:
company_list.insert_beginning(company_name)
return company_list

and use an algorithm to sort or search for data within a data structure:

def display_games():
  print("\nSelected company: " + company_choice.title() + "\n")
  console_list_head = consoles_list.get_head_node()

  while console_list_head.get_next_node() is not None:
    sublist_head = console_list_head.get_value().get_head_node()

    if sublist_head.get_value()[0] == company_choice:
      while sublist_head.get_next_node() is not None:
        print("Console name: " + sublist_head.get_value()[1])
        print("Game name: " + sublist_head.get_value()[2])
        print("Genre: " + sublist_head.get_value()[3])
        print("\n")
        sublist_head = sublist_head.get_next_node()
    console_list_head = console_list_head.get_next_node()
Enter fullscreen mode Exit fullscreen mode

Conclusion

It was a simple enough project in the end, but, yet again it took longer than it should have, because I kept adding more and more to it. Once I stripped it down to just do what was asked, it worked perfectly.

Thankyou for reading.

Top comments (0)