Get the lowest possible pylint score within 128 bytes of python

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question









New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 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














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.










share|improve this question









New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 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












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.










share|improve this question









New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 5 hours ago





















New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









user82938

212




212




New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 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




    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










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!






share|improve this answer






















  • -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

















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 





share|improve this answer








New contributor




user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • 1




    Could you not squeeze another ,os in there? Or are the two trailing spaces necessary for your score?
    – Jonathan Frech
    4 hours ago


















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.






share|improve this answer




















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "200"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    user82938 is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    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






























    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!






    share|improve this answer






















    • -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














    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!






    share|improve this answer






















    • -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












    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!






    share|improve this answer















    -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!







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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
















    • -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










    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 





    share|improve this answer








    New contributor




    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.













    • 1




      Could you not squeeze another ,os in there? Or are the two trailing spaces necessary for your score?
      – Jonathan Frech
      4 hours ago















    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 





    share|improve this answer








    New contributor




    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.













    • 1




      Could you not squeeze another ,os in there? Or are the two trailing spaces necessary for your score?
      – Jonathan Frech
      4 hours ago













    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 





    share|improve this answer








    New contributor




    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    -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 






    share|improve this answer








    New contributor




    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    share|improve this answer



    share|improve this answer






    New contributor




    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    answered 4 hours ago









    user82938

    212




    212




    New contributor




    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    New contributor





    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    user82938 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    • 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




      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











    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.






    share|improve this answer
























      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.






      share|improve this answer






















        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.






        share|improve this answer












        -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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 4 hours ago









        Jo King

        15.7k24089




        15.7k24089




















            user82938 is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            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.













             


            draft saved


            draft discarded














            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













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery