Skip to content

aleong2002/python-package-liatha3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badge

babPy

Team Members

Project Description

"babPy" is a whimsical Python package designed to make coding concepts more accessible and fun for young children and beginners. Specifically, children who have not yet developed speech patterns but understand on an instinctive level what a for loop is. This package replaces traditional functions and built-in class names with playful and nonsensical baby words, creating an entertaining and imaginative way to introduce coding principles to very young learners.

Key Feature of babPy:

Nonsensical Naming: babPy replaces standard Python function and class names with baby words and playful terms. For example, it might rename "print" to "puhoo" and "if" to "fuh."

INSTALL US TODAY WITH pip install babpy

Instructions

  • Using babPy is as easy as 1 2 3 4 5 6 7 8. All of babpy's current functionality is contained in the babpy.talk file. Take, for example, the function 'fuh'
    def fuh(condition, if_true, if_false):
      """
      If Statement for babies.
      
      :param condition: Boolean condition to evaluate.
      :param if_true: Callable to execute if the condition is True.
      :param if_false: Callable to execute if the condition is False.
      :return: The result of either the if_true or if_false callable.
      """
      
      if callable(if_true) and callable(if_false):
          return if_true() if condition else if_false()
      else:
          raise ValueError("Both if_true and if_false must be callable.")

which can be imported and used in tandem with another function, puhoo, like so

from babpy.talk import fuh,puhoo

def too():
    puhoo("yay")

def foo():
    puhoo("foo")

fuh(1 == 2, too, foo)

which will puhoo(print) boo, as 1 does not equal 2.

Testing and Further Development

if you want to work on/add to babpy, just download this respository. Dependencies can be installed via pipenv and we would welcome more contributions to our special vocublary.

How to run unit tests

Simple example unit tests are included within the tests directory. To run these tests:

  1. Install pytest in a virtual environment.
  2. Run the tests from the main project directory: python3 -m pytest.
  3. Tests should never fail. Any failed tests indicate that the production code is behaving differently from the behavior the tests expect.

About

A python package called babPy that rewrites common Python functions with nonsensical function names to make coding easier for babies to understand

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%