ankushbhardwxj / codemon

cli to win programming contests
https://pypi.org/project/codemon/
MIT License
26 stars 12 forks source link

added default python template #70

Closed lucifer0987 closed 3 years ago

lucifer0987 commented 3 years ago

closes #69 added default python template.

ankushbhardwxj commented 3 years ago

@lucifer0987 - Before making the PR, you should've posted the template on the issue itself since I was looking to see some options on the template and also @Enigmage could give some suggestions.

lucifer0987 commented 3 years ago

@ankingcodes Here is the code i used in python template.

import sys input = sys.stdin.readline

integer inputs

def inp():     return(int(input()))

list inputs

def inlt():     return(list(map(int,input().split())))

string inputs(returns as list of characters)

def insr():     s = input()     return(list(s[:len(s) - 1]))

space seperated integer inputs

def invr():     return(map(int,input().split()))

start coding from here

ankushbhardwxj commented 3 years ago

@lucifer0987 - The template is very basic and doesn't have much options for a competitive programmer. @Enigmage - What do you think of it ?

lucifer0987 commented 3 years ago

@ankingcodes But, i thought that's what you wanted. Someone suggested a change in cpp but you said that the template should be basic. And, that's why I used this template. And, current cpp template is also pretty basic. That's why i used this.

ankushbhardwxj commented 3 years ago

The goal is to have a sensible default template that is capable of taking care of the basic needs of the user during a competitive programming contest without having too much boilerplate.

From the issue you're making this PR for.

lucifer0987 commented 3 years ago

@ankingcodes What changes should I include. I will try to improve the PR.

ankushbhardwxj commented 3 years ago

I think you can google for various CP templates by python programmers and find which ones would be good for our software, and post them so that we can decide on one single template. (Don't just copy paste random templates, they should justify the issue)

Enigmage commented 3 years ago

@ankingcodes @lucifer0987 Hey sorry for the late response was busy with some college work.I think I may not be the most helpful person in this scenario since I don't usually do CP in python or java; this is why I didn't add the templates in #55 and created two separate issues so that others who use these two languages for CP can add the templates. Still I can give a few suggestions. We can take inspiration from this https://github.com/rajatg98/Competitive-Coding-Python-Template/blob/master/template.py template for example. It has a lot of good imports that can help in a CP contest. Also these two articles might be helpful

ankushbhardwxj commented 3 years ago

Closing this PR since #74 fixed the issue !