Get the lowest possible pylint score within 128 bytes of python
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
pylint has no lower bound on the scores it will give your code. It uses the following metric to score code, with the maximum score being 10:
10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
With python 3.6, try and write a program that:
Outputs "Hello World" when run from the command line (i.e.
python script.py
), and no other output.Gets the lowest possible score from
pylint
, with default settings (i.e.pylint script.py
)Is strictly less than or equal to 128 bytes in size.
code-challenge python hello-world error-message
New contributor
add a comment |Â
up vote
4
down vote
favorite
pylint has no lower bound on the scores it will give your code. It uses the following metric to score code, with the maximum score being 10:
10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
With python 3.6, try and write a program that:
Outputs "Hello World" when run from the command line (i.e.
python script.py
), and no other output.Gets the lowest possible score from
pylint
, with default settings (i.e.pylint script.py
)Is strictly less than or equal to 128 bytes in size.
code-challenge python hello-world error-message
New contributor
1
If you took the PEP standard of 80 characters per line over ten lines, your maximum byte count would be 800. I would suggest something around 64 or 128 bytes.
â Jonathan Frech
5 hours ago
@JonathanFrech Good point. I've set to 128 bytes. Thanks for your help!
â user82938
5 hours ago
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
pylint has no lower bound on the scores it will give your code. It uses the following metric to score code, with the maximum score being 10:
10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
With python 3.6, try and write a program that:
Outputs "Hello World" when run from the command line (i.e.
python script.py
), and no other output.Gets the lowest possible score from
pylint
, with default settings (i.e.pylint script.py
)Is strictly less than or equal to 128 bytes in size.
code-challenge python hello-world error-message
New contributor
pylint has no lower bound on the scores it will give your code. It uses the following metric to score code, with the maximum score being 10:
10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
With python 3.6, try and write a program that:
Outputs "Hello World" when run from the command line (i.e.
python script.py
), and no other output.Gets the lowest possible score from
pylint
, with default settings (i.e.pylint script.py
)Is strictly less than or equal to 128 bytes in size.
code-challenge python hello-world error-message
code-challenge python hello-world error-message
New contributor
New contributor
edited 5 hours ago
New contributor
asked 5 hours ago
user82938
212
212
New contributor
New contributor
1
If you took the PEP standard of 80 characters per line over ten lines, your maximum byte count would be 800. I would suggest something around 64 or 128 bytes.
â Jonathan Frech
5 hours ago
@JonathanFrech Good point. I've set to 128 bytes. Thanks for your help!
â user82938
5 hours ago
add a comment |Â
1
If you took the PEP standard of 80 characters per line over ten lines, your maximum byte count would be 800. I would suggest something around 64 or 128 bytes.
â Jonathan Frech
5 hours ago
@JonathanFrech Good point. I've set to 128 bytes. Thanks for your help!
â user82938
5 hours ago
1
1
If you took the PEP standard of 80 characters per line over ten lines, your maximum byte count would be 800. I would suggest something around 64 or 128 bytes.
â Jonathan Frech
5 hours ago
If you took the PEP standard of 80 characters per line over ten lines, your maximum byte count would be 800. I would suggest something around 64 or 128 bytes.
â Jonathan Frech
5 hours ago
@JonathanFrech Good point. I've set to 128 bytes. Thanks for your help!
â user82938
5 hours ago
@JonathanFrech Good point. I've set to 128 bytes. Thanks for your help!
â user82938
5 hours ago
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
3
down vote
-3330.00 -3540.00
- Lost 210 points thanks to Dennis -- exiting with the required string instead of printing it.
exit("Hello World"
)>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_
Try it online!
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3540
â Dennisâ¦
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
add a comment |Â
up vote
0
down vote
-335.0
126 bytes
print("Hello World");import os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os
New contributor
1
Could you not squeeze another,os
in there? Or are the two trailing spaces necessary for your score?
â Jonathan Frech
4 hours ago
add a comment |Â
up vote
0
down vote
-840.0
print("Hello World"),0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0
Try it online!
0<0
seems to be pretty good, for a score of -30 points per each occurrence.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
-3330.00 -3540.00
- Lost 210 points thanks to Dennis -- exiting with the required string instead of printing it.
exit("Hello World"
)>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_
Try it online!
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3540
â Dennisâ¦
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
add a comment |Â
up vote
3
down vote
-3330.00 -3540.00
- Lost 210 points thanks to Dennis -- exiting with the required string instead of printing it.
exit("Hello World"
)>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_
Try it online!
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3540
â Dennisâ¦
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
-3330.00 -3540.00
- Lost 210 points thanks to Dennis -- exiting with the required string instead of printing it.
exit("Hello World"
)>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_
Try it online!
-3330.00 -3540.00
- Lost 210 points thanks to Dennis -- exiting with the required string instead of printing it.
exit("Hello World"
)>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_>_,_
Try it online!
edited 2 hours ago
answered 3 hours ago
Jonathan Frech
5,85311039
5,85311039
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3540
â Dennisâ¦
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
add a comment |Â
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3540
â Dennisâ¦
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3330 is the score with a trailing newline, which puts the byte count at 129. The missing final newline decreases the score to -3340.
â Dennisâ¦
3 hours ago
-3540
â Dennisâ¦
2 hours ago
-3540
â Dennisâ¦
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
@Dennis Did not know pylint penalizes you for the trailing new line; thanks for the improvement.
â Jonathan Frech
2 hours ago
add a comment |Â
up vote
0
down vote
-335.0
126 bytes
print("Hello World");import os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os
New contributor
1
Could you not squeeze another,os
in there? Or are the two trailing spaces necessary for your score?
â Jonathan Frech
4 hours ago
add a comment |Â
up vote
0
down vote
-335.0
126 bytes
print("Hello World");import os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os
New contributor
1
Could you not squeeze another,os
in there? Or are the two trailing spaces necessary for your score?
â Jonathan Frech
4 hours ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
-335.0
126 bytes
print("Hello World");import os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os
New contributor
-335.0
126 bytes
print("Hello World");import os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os,os
New contributor
New contributor
answered 4 hours ago
user82938
212
212
New contributor
New contributor
1
Could you not squeeze another,os
in there? Or are the two trailing spaces necessary for your score?
â Jonathan Frech
4 hours ago
add a comment |Â
1
Could you not squeeze another,os
in there? Or are the two trailing spaces necessary for your score?
â Jonathan Frech
4 hours ago
1
1
Could you not squeeze another
,os
in there? Or are the two trailing spaces necessary for your score?â Jonathan Frech
4 hours ago
Could you not squeeze another
,os
in there? Or are the two trailing spaces necessary for your score?â Jonathan Frech
4 hours ago
add a comment |Â
up vote
0
down vote
-840.0
print("Hello World"),0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0
Try it online!
0<0
seems to be pretty good, for a score of -30 points per each occurrence.
add a comment |Â
up vote
0
down vote
-840.0
print("Hello World"),0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0
Try it online!
0<0
seems to be pretty good, for a score of -30 points per each occurrence.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
-840.0
print("Hello World"),0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0
Try it online!
0<0
seems to be pretty good, for a score of -30 points per each occurrence.
-840.0
print("Hello World"),0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0,0<0
Try it online!
0<0
seems to be pretty good, for a score of -30 points per each occurrence.
answered 4 hours ago
Jo King
15.7k24089
15.7k24089
add a comment |Â
add a comment |Â
user82938 is a new contributor. Be nice, and check out our Code of Conduct.
user82938 is a new contributor. Be nice, and check out our Code of Conduct.
user82938 is a new contributor. Be nice, and check out our Code of Conduct.
user82938 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f172445%2fget-the-lowest-possible-pylint-score-within-128-bytes-of-python%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
If you took the PEP standard of 80 characters per line over ten lines, your maximum byte count would be 800. I would suggest something around 64 or 128 bytes.
â Jonathan Frech
5 hours ago
@JonathanFrech Good point. I've set to 128 bytes. Thanks for your help!
â user82938
5 hours ago