CS_Part_2_Module16Asssignment (1)
CS_Part_2_Module16Asssignment (1)
Note: Make sure your links are live links and will go to the URL when clicked.
To do this, after pasting the URL, add a space. The URL will automatically
become a live hyperlink.
Code HS Lessons
CodeHS Lesson 11.9: Modules (2 points)
URL:
https://codehs.com/student/1298751/section/287011/assignments
CodeHS Lesson 11.10: Classes and Objects Quiz (2 points)
URL:
https://codehs.com/student/1298751/section/287013/assignments
Client: Joe provided the requirements he expected for the code. He also
is the reason we made it.
Beta Tester: Zack tested the code to make sure Abdirahman completed
everything well. He would also give Abdirahman feedback during the
process.
What collaboration tools did your Capstone Project Team use during the
project? How well did these tools work?
CTE
Computer Science, Part 2
Module 16 Assignment
Capstone Project
Note: If you completed your project in Visual Studio Code, you will need to zip
your folder into a zip file and upload that one zip file to the Module 16
Assignment. If you completed the project in CodeHS you should share the
program to get the link to submit here. If you completed the project in
CodeSandbox you will need to copy the link to the program and submit it
here.
URL: https://codehs.com/sandbox/id/capstone-project-SS1DGO
Copy and paste your project Python code below.
class LibrarySystem:
library_books = []
def __init__(self):
self.genres = set()
if book[0].lower() == book_name.lower():
print(f"'{book_name}' is in the library at position {idx + 1}.")
return
print(f"'{book_name}' is not in the library.")
def display_books(self):
"""Displays all books in the library."""
if not self.library_books:
print("The library is empty!")
else:
print("\nBooks in the Library:")
for book, genre in self.library_books:
print(f"- {book} ({genre})")
else:
print(f"No books found in the genre '{genre}'.")
def sort_books(self):
"""Sorts the library alphabetically by book name."""
self.library_books.sort(key=lambda book: book[0])
print("The library has been sorted alphabetically!")
def main():
library = LibrarySystem()
while True:
print("\nLibrary Menu:")
CTE
Computer Science, Part 2
Module 16 Assignment
if choice == "1":
book_name = input("Enter the name of the book to add: ")
genre = input("Enter the genre of the book: ")
library.add_book(book_name, genre)
elif choice == "2":
book_name = input("Enter the name of the book to search for: ")
library.search_book(book_name)
elif choice == "3":
library.display_books()
elif choice == "4":
genre = input("Enter the genre to get recommendations: ")
library.recommend_books(genre)
CTE
Computer Science, Part 2
Module 16 Assignment
if __name__ == "__main__":
main()
CTE
Computer Science, Part 2
Module 16 Assignment
Describe how you have met the Design criteria for the Idea
Design and Refinement micro-credential.
Describe how you have met the Adapt criteria for the Idea
Design and Refinement micro-credential.
Describe how you have met the Refine criteria for the Idea
Design and Refinement micro-credential.