Skip to content

Official Python package for the Beginner.Codes Discord server.

Notifications You must be signed in to change notification settings

beginner-codes/beginner.codes-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beginner.Codes Python Package

This is the official Python Package for the Beginner.Codes Discord server.

Running Challenge Tests

  • Install the package: pip install beginner.codes
  • Import the test runner: from beginnercodes.challenges import test
  • Run the tests, passing in the challenge number and your solution function: test(458, n_differences)
  • Optionally, you can add two options description=True and examples=True to print out the challenge information without leaving the terminal
from beginnercodes.challenges import test

def n_differences(nums: list[int]) -> int:
    return 0  # Your code goes here!!!


test(458, n_differences)
test(458, n_differences, description=True)
test(458, n_differences, examples=True)
test(458, n_differences, True, True) # for both

This will handle downloading the necessary challenge test cases and will run them against your code. It will show you which tests failed, what went wrong, and how many tests succeeded.

About

Official Python package for the Beginner.Codes Discord server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages