Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completing the report and addressing the KBA #5

Open
wants to merge 1 commit into
base: 3-code-using-a-modular-approach
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions kba.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Overview
Provide brief answers to the knowledge-question worksheet.

## Answers

1. Briefly explain what is modular programming

My answer is such and such....


2. How can you import only a specific function or class from a module in Python? What is the syntax for this?

My answer is such and such....

3. How would you explain Python's parameter-passing mechanism? Is it more similar to pass-by-value or pass-by-reference? Justify your answer.

etc...

4. Given the following Python code, what will be the output and why?

```python
def modify_list(list_):
list_.append("new")
list_ = ["completely", "new"]

items = ["original"]
modify_list(items)
print(items)
```


5. In Python, even though variables created within a function are local, there are still situations where you can modify data outside the scope with a local variable. Explain this anomaly and relate it to both mutability and pass by reference.


6. List two benefits of modular coding approaches. How do these benefits assist in the development of medium-sized applications?
39 changes: 39 additions & 0 deletions report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Overview
Provides a report addressing the following questions:

```text
Justification for your refactoring decisions.
The challenges you would have faced maintaining and testing the original monolithic code.
How you would modify your refactored code to handle a custom-sized tic-tac-toe game (larger than 3x3), and how this implementation would be easier to handle than in the original code.
```

## Justification

I refactored the code into classes because ... ... it provides the following benefits:

1. benefit
2. benefit
3. benefit

Without the refactoring, the code would have faced the following challenges:
1. challenge
2. challenge

## Handling Custom-Sized Tic-Tac-Toe

My implementation can handle custom sizes because:
1. reason
2. reason
3. reason

On the other hand, the original code could not handle custom sizes because:
1. reason
2. reason
3. reason

## Conclusion

The activity allowed me to practice refactoring and to understand the benefits of object-oriented programming. I learned that ... ... and I will apply this knowledge in future projects.