Skip to content

Commit

Permalink
Merge branch 'main' into challenge-8-the-palindrome-detector
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Glucose authored Jan 11, 2025
2 parents 8040098 + 8d22cdf commit b4ecc9a
Show file tree
Hide file tree
Showing 23 changed files with 919 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,14 @@
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
}
}
},
"python.testing.unittestArgs": [
"-v",
"-s",
"./solutions",
"-p",
"*test.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true
}
156 changes: 154 additions & 2 deletions collaboration/learning_goals.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,157 @@
# Learning Goals

## Collective
## Collectives

## Individual
1. **Enhance Problem-Solving Skills**
**Objective:** Develop strategies to approach and solve
complex coding problems efficiently.
**Action:** Participate in coding challenges, improve algorithmic thinking,
and practice solving problems in various programming languages.

2. **Master Version Control Systems (Git)**
**Objective:** Gain proficiency in version control systems,
specifically Git, for managing collaborative code.
**Action:** Learn advanced Git commands, work with branches, and contribute
to open-source projects or group collaborations using GitHub.

3. **Strengthen Data Structures and Algorithms Knowledge**
**Objective:** Deepen understanding of essential data structures and
algorithms to optimize code performance.
**Action:** Study common algorithms (searching, sorting, dynamic programming)
and data
structures (trees, graphs, heaps, etc.), and apply them to solve coding problems.

4. **Develop Testing and Debugging Skills**
**Objective:** Understand and practice writing unit tests and debugging
code to ensure high-quality, bug-free applications.
**Action:** Use testing frameworks such as pytest and unittest,
and integrate continuous integration tools to automate testing.

5. **Improve Collaboration and Communication Skills**
**Objective:** Work effectively in teams by improving communication
and collaborative coding skills.
**Action:** Engage in group projects, participate in code reviews, and focus on
improving your ability to explain technical concepts clearly.

6. **Set Personal Learning Goals and Track Progress**
**Objective:** Set personal learning goals and track your progress.
**Action:** Identify specific areas for improvement, create a
learning plan, and regularly review your progress.

7. **Enhance Code Quality and Maintainability**
**Objective:** Write clean, maintainable, and efficient code.
**Action:** Follow best practices for code styling and documentation. Use linters
and formatters to ensure consistent code quality. Perform regular code refactoring.

8. **Participate More in the Slack Community and Create Networking Opportunities**
**Objective:** Build a professional network in the tech community.
**Action:** Attend meetups, help coders with questions,
join online forums, and participate in tech events.
Engage with other developers and share knowledge and experiences.

## Individual Goals

### Adolfo Fumero

---

### Ana Isabel Murillo

- Gain advanced knowledge in technological skills and AI.
- Improve proficiency in data analysis, machine learning, or other tech-related fields.
- Master design thinking principles to approach challenges creatively.
- Learn cutting-edge tools and methodologies used in technology and innovation.

---

### Arthur Dorvil

- **Strengthen Technical Expertise**
Master advanced programming concepts, software development methodologies, AI,
and machine learning to build impactful projects.
- **Foster Innovation**
Develop problem-solving skills by creating sustainable and scalable solutions
that address real-world challenges, particularly in
underserved communities.
- **Enhance Leadership Skills**
Improve team management, communication, and decision-making abilities to lead
projects effectivelyand inspire others in collaborative environments.
- **Expand Global Collaboration**
Build connections with peers and professionals globally, leveraging their
expertise to tackle challenges and drive impactful initiatives.
- **Drive Social Impact with Technology**
Learn to integrate technology into community-focused projects, particularly
addressing global issues like digital literacy and technology
access in Haiti and Black communities.

---

### Chrismy

- Gain more knowledge and hands-on experience with industry-standard tools and
technologies like VS Code, Python, GitHub.
- Learn to analyze, design, and implement innovative solutions.
- Strengthen interpersonal communication, teamwork, and leadership capabilities
to excel in collaborative environments.
- Leverage opportunities to connect with peers.

---

### Cliforde Exael

- Master advanced programming concepts and technologies.
- Develop innovative problem-solving skills for real-world challenges.
- Enhance collaboration and leadership abilities in tech environments.
- Build a strong professional network and drive social impact.

---

### Hector Colmenares

- Learn data science and machine learning.
- Practice technical communication skills in English.
- Understand how to conduct a good code review.
- Connect with people and learn from them.
- Actively participate in group activities to learn from more advanced peers.

---

### Jeampierr Jiménez

---

### Pierre Kenley MERVIL

- Learn about collaboration tools.
- Master Git and GitHub, including advanced Git commands and GitHub project boards.
- Work on Python programs and collaborate with peers globally.
- Gain sufficient skills to become a data scientist.
- Develop soft skills to manage time effectively, becoming more proactive and productive.

---

### Ramon Colmenares

- Learn about Python and data science.
- Improve soft skills like leadership and communication.
- Create new connections with classmates.

---

### Semira Tesfai

- **Enhance Code Quality and Maintainability**
**Objective:** Write clean, maintainable, and efficient code.
**Action:** Follow best practices for code styling and documentation. Use linters
and formatters to ensure consistent code quality. Perform regular code refactoring.
- **Participate More in the Slack Community and Create Networking Opportunities**
**Objective:** Build a professional network in the tech community.
**Action:** Attend meetups, help coders with questions,
join online forums, and participate in tech events.
Engage with other developers and share knowledge and experiences.
- **Increase Code Vocabulary by Self-Created Library**
**Objective**: Expand my coding vocabulary and create a reusable library of
functions and modules.
**Action:** Identify commonly used functions and modules in my coding projects,
develop reusable code snippets, document my library with clear instructions and examples,
and continuously update and refine it as I learn new concepts.
51 changes: 51 additions & 0 deletions solutions/challenge_12/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!--
Make your issue easy to find:
- project board: place it in the TODO column of the project board
- labels: anything that will make this easier to filter
-->

<!--
<!-- **challenge** -->
<!-- markdownlint-disable MD041 -->
Objective:
Create a program that prints the numbers from 1 to 100. But for multiples of three,
print "Fizz" instead of the number, and for multiples of five, print "Buzz". For
numbers that are multiples of both three and five, print "FizzBuzz".

Another way of putting it:

# **FizzBuzz Challenge**

This is a FizzBuzz program that prints numbers from 1 to 100 with specific rules:

- For multiples of three, print "Fizz".
- For multiples of five, print "Buzz".
- For multiples of both three and five, print "FizzBuzz".
-->

<!-- **Helpful links or resources for solving this challenge** -->
For each number from 1 to 100:
If the number is divisible by both 3 and 5:
Print "FizzBuzz"
Else if the number is divisible by 3:
Print "Fizz"
Else if the number is divisible by 5:
Print "Buzz"
Else:
Print the number

Resource Guide for Solving "FizzBuzz" Challenge
Understanding Loops and Conditionals:

Python For Loops - W3Schools <https://www.w3schools.com/python/python_for_loops.asp?form=MG0AV3>

Python If...Else Statements - W3Schools <https://www.w3schools.com/python/python_conditions.asp?form=MG0AV3>

Modulo Operator:

Python Operators - W3Schools <https://www.w3schools.com/python/python_operators.asp?form=MG0AV3>

Focus on the "Arithmetic Operators" section, especially the modulo operator (%).

These articles provide a general approach to breaking down and solving the problem.
Empty file.
54 changes: 54 additions & 0 deletions solutions/challenge_12/fizzbuzz_program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
A module for solving the FizzBuzz challenge.
Module contents:
- fizzbuzz: Generates the FizzBuzz sequence for numbers from 1 to n.
Created on 06/01/2025
Author: Hector Colmenares
"""


def fizzbuzz(n: int) -> list[str]:
"""Generates the FizzBuzz sequence from 1 to n.
Parameters:
n (int): The upper limit of the sequence (must be a positive integer).
The range includes the limit n.
Returns:
list[str]: A list of strings where:
- "Fizz" replaces multiples of 3,
- "Buzz" replaces multiples of 5,
- "FizzBuzz" replaces multiples of both,
- Otherwise, the number itself as a string.
Raises:
ValueError: If n is not a positive integer.
Examples:
>>> fizzbuzz(3)
['1', '2', 'Fizz']
>>> fizzbuzz(5)
['1', '2', 'Fizz', '4', 'Buzz']
>>> fizzbuzz(15)[-1]
'FizzBuzz'
"""
assert isinstance(n, int), "n must be an integer"
assert n > 0, "n must be a positive integer"

result = []
for i in range(1, n + 1):
if i % 3 == 0 and i % 5 == 0:
result.append("FizzBuzz")
elif i % 3 == 0:
result.append("Fizz")
elif i % 5 == 0:
result.append("Buzz")
else:
result.append(str(i))
return result
46 changes: 46 additions & 0 deletions solutions/challenge_16/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# **Challenge: Hide a Credit Card Number**
<!-- markdownlint-disable MD036 -->
**Description**
<!-- markdownlint-disable MD013 -->
The "Hide a Credit Card Number" challenge involves writing a function to mask all but the last four digits of a credit card number. This is useful for displaying sensitive information in a secure manner. The masked digits should be replaced with the `*` character.

Write a function that takes a credit card number as a string and returns the masked version of the number, with only the last four digits visible.

**For example:**
<!-- markdownlint-disable MD040 -->
```
Input: '1234567812345678'
Output: '************5678'
```

**Requirements:**

The input will always be a valid credit card number as a string.
The function should preserve the last four digits.
It should handle inputs of varying lengths (e.g., short card numbers).

**Example**

```
hide_credit_card('1234567812345678')
# Output: '************5678'
hide_credit_card('9876543210987654')
# Output: '************7654'
hide_credit_card('1234')
# Output: '1234' (no masking needed if the number has only 4 or fewer digits)
```

**Testing**

Develop unit tests to validate the function's correctness. Include cases for:

- Regular 16-digit credit card numbers.
- Short numbers (e.g., fewer than 8 digits).
- Edge case: Exactly 4 digits (no masking needed).

**Helpful Links**

- [String Slicing in Python](https://www.geeksforgeeks.org/string-slicing-in-python/)
- [GeeksforGeeks: Python String Methods](https://www.geeksforgeeks.org/python-string-methods/)
Empty file.
46 changes: 46 additions & 0 deletions solutions/challenge_16/hide_credit_card_number.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
A module for masking sensitive credit card numbers.
Module contents:
- hide_credit_card: masks all but the last four digits of a credit card number.
Created on 04/01/2025
Author: Hector Colmenares
"""


def hide_credit_card(card_number: str) -> str:
"""Masks all but the last four digits of a credit card number.
Parameters:
card_number: str, a valid credit card number as a string
Returns -> str with the masked credit card number, keeping only the last four digits visible
Raises:
ValueError: if the input is not a string
ValueError: if the input is empty or contains non-digit characters
>>> hide_credit_card('1234567812345678')
'************5678'
>>> hide_credit_card('9876543210987654')
'************7654'
>>> hide_credit_card('1234')
'1234'
"""
# Ensure the input is a valid string of digits
if not isinstance(card_number, str):
raise ValueError("Input must be a string.")
if not card_number.isdigit() or len(card_number) == 0:
raise ValueError("Input must be a non-empty string of digits.")

# If the length is less than or equal to 4, return the card number unchanged
if len(card_number) <= 4:
return card_number

# Mask all but the last four digits
return "*" * (len(card_number) - 4) + card_number[-4:]
Loading

0 comments on commit b4ecc9a

Please sign in to comment.