Giter Site home page Giter Site logo

rafaelbroseghini / communipy Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 5.0 1.8 MB

:books: :pencil2: Python, Learning, Sharing, Contributing :computer: :snake:

License: MIT License

Python 100.00%
python practice-programming unit-test learning-exercise coding-exercises

communipy's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m Rafa!
  • ๐Ÿ“ซ How to reach me -> Linkedin

communipy's People

Contributors

abftinker avatar ash2shukla avatar pedrorteles avatar rafaelbroseghini avatar vishnurvn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

communipy's Issues

Add project ideas

Add project ideas following guideline on TEMPLATE.md within Project Ideas folder.

Inconsistent and Improper Indents. add Guidelines to CONTRIBUTING.md

print("\n.Passed task 1 with no errors!")

Extra space causing test case to fail.

"""
Given a number, return if it is even or odd.
"""

Improper indents make files look inconsistent.

Many pushes have these naive mistakes which make practice files look weird. Please add guidelines to CONTRIBUTING.md about submitting PEP8 compliant code or better, define standards by giving a template for additions.

Formatting of practice files.

I have two suggestions regarding the Formatting of the practice files.

  1. I found the header String to be a bit non-standard.

__ author __ is assigned the author name mostly.
and the date and filename can be generated if needed by __ file __ and os.path.getmtime(__ file __).
If needed then other meta information can be given as __ excercise __.

__author__="John Doe"
__excercise__="Strings" # optional
__date__ ="12/12/1234"  # optional
  1. I suggest giving the problem statement as a docstring to a function as it makes it much less ambiguous that where should a particular question's answer should be given.
    Take this for instance-
"""some question"""

def taskx():
    pass

"""some other question"""

def tasky():
    pass
def taskx():
    """some question"""
    pass

def tasky():
    """some other question"""
    pass

The latter looks more neat to me.

Changes in .gitignore?

*.pyc should also be added else it will ignore the directory __ pycache __ but not the *.pyc files under it which is making it add __ pycache __ again and again.

Ambiguity in math problems and module.

math problems file is named math.py, if someone tries to import math in it, it will import itself.

# For purposes of practicing do not import math.
# Assume pi = 3.14

Instead of resolving the name problem comment is given that assume values instead of importing?

it should be renamed to maths.py

def sum_them_all(number):
"""
Given a number, return the sum of all digits from
zero to the number (inclusive).
"""
pass

Problem doesn't state what to do when number is negative, neither it says that number will only be positive.
Give proper conditions for input.

def even_or_odd(number):
"""
Given a number, return if it is even or odd.
"""
pass

Tell explicitly what to return eg.

"""
        Given a number, return string 'even' if it is even or 'odd' if it is odd.
"""

Add Dicts folder

Add dicts.py and test_dicts.py with exercises and test cases respectively.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.