Skip to content

Commit 5c3fa24

Browse files
Update README & pyproject.toml
1 parent c10fdbd commit 5c3fa24

File tree

7 files changed

+33
-14
lines changed

7 files changed

+33
-14
lines changed

.github/workflows/code_quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Python
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.11
19+
python-version: 3.12
2020

2121
- name: Install dependencies
2222
run: |

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Solutions to CodinGame Puzzles
22

3-
![CodinGame](images/MeanMax_Logo.jpg)
3+
<p align="center">
4+
<a href="https://www.codingame.com/"><img src="images/codingame-1.svg" width="200" height="200" /></a>
5+
</p>
46

57
The "Solutions to CodinGame Puzzles" project is a collection of answers to coding problems from CodinGame. CodinGame is a website where people can practice coding by solving puzzles. In this project, people have written solutions to these puzzles using languages like Python, C++, and Java. Each solution is saved in a file named after the puzzle it solves. The puzzles range from easy to hard and cover different coding topics like variables, conditions, and arrays. The goal of the project is to help developers get better at problem-solving and learn different ways of coding. It also includes explanations to help people understand the solutions better.
68

7-
![](https://img.shields.io/github/languages/count/charlesfranciscodev/codingame.svg) ![Python Version](https://img.shields.io/badge/python-3.11%2B-blue.svg) [![](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9+
![](https://img.shields.io/github/languages/count/charlesfranciscodev/codingame.svg) ![Python Version](https://img.shields.io/badge/python-3.12%2B-blue.svg) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
810

911
## Puzzles
1012

@@ -60,7 +62,7 @@ The "Solutions to CodinGame Puzzles" project is a collection of answers to codin
6062

6163
```shell
6264
# create a new virtual environment
63-
conda create --name codingame python=3.11
65+
conda create --name codingame python=3.12
6466
conda activate codingame
6567
pip3 install poetry
6668

@@ -72,10 +74,26 @@ poetry run ruff check .
7274

7375
# Formatting
7476
poetry run ruff format .
77+
78+
# Update Python version
79+
conda update python
80+
81+
# Update ruff version
82+
poetry add ruff@latest --dev
7583
```
7684

7785
## General Tips
7886

7987
To effectively solve CodinGame puzzles, thoroughly understand the problem, break it into manageable steps, and use input/output specs for your solution. Employ appropriate data structures and algorithms like BFS, DFS, binary search, or sorting, optimizing for efficiency with techniques such as dynamic programming. Test against sample inputs, document your code well, collaborate, and explore different languages for skill development.
8088

81-
As you start learning to code on CodinGame, you're entering a world of puzzles that will test your skills in new ways. From adjusting simple things to solving harder problems with graphs and dynamic programming, you'll explore important programming ideas. Using Python, C++, or Java, you'll solve challenges like working with temperatures or helping Thor on adventures. Whether you're making pictures with characters or finding your way through a maze, each task will make you better at solving problems and teach you more about coding. Each puzzle you solve adds to a big collection of solutions, making a community of learners and creators. As you take on each challenge, you won't just get answers – you'll understand algorithms, data structures, and coding better. So, jump in, be creative, and enjoy learning and discovering new things on CodinGame.
89+
## Learning Opportunities
90+
91+
CodinGame is an ideal platform for aspiring programmers to practice and improve their coding skills in a variety of programming languages. It offers a wide range of challenges, puzzles, and games that cater to different skill levels, from beginner to advanced. The platform provides a fun and engaging environment for coders to learn from their peers and develop their coding skills. CodinGame helps programmers:
92+
93+
- Develop problem-solving skills and learn new algorithms and techniques.
94+
- Practice writing clean, efficient, and well-documented code.
95+
- Learn new programming languages and compare different language implementations.
96+
- Develop debugging skills and learn how to use tools to identify and fix errors.
97+
- Learn about the importance of time complexity and optimization.
98+
- Learn how to approach large problems by breaking them down into smaller, manageable steps.
99+
- Learn how to collaborate with others and build a team-based learning experience.

clash-of-code/fastest/product-and-sum/test_product_and_sum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from product_and_sum import product_and_sum_of_consecutive_integers
3+
from product_and_sum import product_and_sum_of_consecutive_integers
44

55

66
class TestProductAndSum(unittest.TestCase):
@@ -17,5 +17,5 @@ def test_product_and_sum_positive(self):
1717
self.assertEqual(product_and_sum_of_consecutive_integers(15), (1307674368000, 120))
1818

1919

20-
if __name__ == '__main__':
20+
if __name__ == "__main__":
2121
unittest.main()

clash-of-code/shortest/count-working-codes/count_working_codes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def calculate_combinations(valid_count):
1111
return valid_count * (valid_count - 1) * (valid_count - 2)
1212

1313

14-
if __name__ == '__main__':
14+
if __name__ == "__main__":
1515
input_str = input()
1616
valid_count = count_valid_codes(input_str)
1717
result = calculate_combinations(valid_count)

clash-of-code/shortest/count-working-codes/test_code_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ def test_valid_count_greater_than_or_equal_to_3(self):
2424
self.assertEqual(calculate_combinations(3), 6)
2525

2626

27-
if __name__ == '__main__':
27+
if __name__ == "__main__":
2828
unittest.main()

images/codingame-1.svg

Lines changed: 1 addition & 0 deletions
Loading

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[tool.poetry]
22
name = "codingame"
33
version = "0.1.0"
4-
description = "The project offers a diverse repository of solutions to programming challenges from CodinGame, featuring implementations in Python, C++, Java, and other languages. Organized by challenge difficulty, topics span from basic concepts like variables and conditions to advanced topics such as graphs and dynamic programming. With a focus on efficiency and clarity, the project aims to enhance developers' problem-solving skills while fostering friendly competition. Detailed documentation and adherence to coding standards ensure accessibility for contributors and users, making it a valuable resource for developers seeking to hone their coding abilities through engaging challenges."
4+
description = "Solutions to CodinGame Puzzles"
55
authors = ["Charles-A. Francisco"]
66
readme = "README.md"
77

88
[tool.poetry.dependencies]
9-
python = "^3.11"
9+
python = "^3.12"
1010

1111
[tool.poetry.group.dev.dependencies]
12-
ruff = "^0.2.2"
12+
ruff = "^0.6.8"
1313

1414
[build-system]
1515
requires = ["poetry-core"]
@@ -49,8 +49,8 @@ exclude = [
4949
line-length = 120
5050
indent-width = 4
5151

52-
# Python version
53-
target-version = "py311"
52+
# Always generate Python 3.12 compatible code.
53+
target-version = "py312"
5454

5555
[tool.ruff.lint]
5656
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.

0 commit comments

Comments
 (0)