Skip to content

Python Challenges

Paul Ambrose edited this page Jul 27, 2020 · 6 revisions

Python Challenges

Python challenges must adhere to this general format:

# @desc This is a description of **func_name**

def func_name(s):              
    c = 2 * s
    return c


def main():
    print(func_name('Car'))
    print(func_name('Toy'))
    print(func_name('Elephant'))


if __name__ == '__main__':
    main()
  • func_name can be any valid Python function name.
  • Challenge descriptions are embedded within Python comments (with @desc attribute).
  • Challenge descriptions support markdown.
  • Each print() will act as a separate input for the user. You can have as many as you want.
  • Please adhere to the same order of declarations as described here.