No code output when writing statements in Visual Studio

Multi tool use
Multi tool use












0















I'm new to Python. I have visual studio and the Python 2.7 shell.



I can run 5 + 5 in the Python shell which outputs 10.



However if I do 5 + 5 in visual studio, I don't get an output. Why is this the case?










share|improve this question

























  • You are not going to get a answer because the question is to vague. Be more specific, show your code, and talk about how you are using visual studios in tandem with Python.

    – Rob
    Dec 28 '18 at 21:56













  • a python shell is a line in- line out type of setup (or an interpreter). A script or program on the other hand will not try to display an output for every single line, but they will run still the same. in visual studio, try print 5 + 5 instead which explicitly displays a line

    – Paritosh Singh
    Dec 28 '18 at 22:01
















0















I'm new to Python. I have visual studio and the Python 2.7 shell.



I can run 5 + 5 in the Python shell which outputs 10.



However if I do 5 + 5 in visual studio, I don't get an output. Why is this the case?










share|improve this question

























  • You are not going to get a answer because the question is to vague. Be more specific, show your code, and talk about how you are using visual studios in tandem with Python.

    – Rob
    Dec 28 '18 at 21:56













  • a python shell is a line in- line out type of setup (or an interpreter). A script or program on the other hand will not try to display an output for every single line, but they will run still the same. in visual studio, try print 5 + 5 instead which explicitly displays a line

    – Paritosh Singh
    Dec 28 '18 at 22:01














0












0








0








I'm new to Python. I have visual studio and the Python 2.7 shell.



I can run 5 + 5 in the Python shell which outputs 10.



However if I do 5 + 5 in visual studio, I don't get an output. Why is this the case?










share|improve this question
















I'm new to Python. I have visual studio and the Python 2.7 shell.



I can run 5 + 5 in the Python shell which outputs 10.



However if I do 5 + 5 in visual studio, I don't get an output. Why is this the case?







python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 28 '18 at 22:35









cricket_007

80.4k1142110




80.4k1142110










asked Dec 28 '18 at 21:46









appleoaktreeappleoaktree

6




6













  • You are not going to get a answer because the question is to vague. Be more specific, show your code, and talk about how you are using visual studios in tandem with Python.

    – Rob
    Dec 28 '18 at 21:56













  • a python shell is a line in- line out type of setup (or an interpreter). A script or program on the other hand will not try to display an output for every single line, but they will run still the same. in visual studio, try print 5 + 5 instead which explicitly displays a line

    – Paritosh Singh
    Dec 28 '18 at 22:01



















  • You are not going to get a answer because the question is to vague. Be more specific, show your code, and talk about how you are using visual studios in tandem with Python.

    – Rob
    Dec 28 '18 at 21:56













  • a python shell is a line in- line out type of setup (or an interpreter). A script or program on the other hand will not try to display an output for every single line, but they will run still the same. in visual studio, try print 5 + 5 instead which explicitly displays a line

    – Paritosh Singh
    Dec 28 '18 at 22:01

















You are not going to get a answer because the question is to vague. Be more specific, show your code, and talk about how you are using visual studios in tandem with Python.

– Rob
Dec 28 '18 at 21:56







You are not going to get a answer because the question is to vague. Be more specific, show your code, and talk about how you are using visual studios in tandem with Python.

– Rob
Dec 28 '18 at 21:56















a python shell is a line in- line out type of setup (or an interpreter). A script or program on the other hand will not try to display an output for every single line, but they will run still the same. in visual studio, try print 5 + 5 instead which explicitly displays a line

– Paritosh Singh
Dec 28 '18 at 22:01





a python shell is a line in- line out type of setup (or an interpreter). A script or program on the other hand will not try to display an output for every single line, but they will run still the same. in visual studio, try print 5 + 5 instead which explicitly displays a line

– Paritosh Singh
Dec 28 '18 at 22:01












2 Answers
2






active

oldest

votes


















1














That is because, when you use the python shell. Shell is executing 5 + 5 when you press enter. Meaning shell executes you commands line by line, as you type them.



On the other hand Visual Studio is not a shell environment, it is an IDE (editor). Which allows you to write the whole python program and then execute it all at once.






share|improve this answer































    1














    In the shell the "addition" is evaluated immediately.



    In the editor you have to write:



    print(5 + 5)


    You have to tell the program, that it should "print" something in the shell.



    More Examples:



    print("this will be printed")

    print("this is a" + "test")


    In the last example the second string is appended to the first one.



    For reference or learning Python






    share|improve this answer


























    • Well, whatever is typed is "evaluated", not "solved"

      – cricket_007
      Dec 28 '18 at 22:36













    Your Answer






    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: "1"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53964599%2fno-code-output-when-writing-statements-in-visual-studio%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    That is because, when you use the python shell. Shell is executing 5 + 5 when you press enter. Meaning shell executes you commands line by line, as you type them.



    On the other hand Visual Studio is not a shell environment, it is an IDE (editor). Which allows you to write the whole python program and then execute it all at once.






    share|improve this answer




























      1














      That is because, when you use the python shell. Shell is executing 5 + 5 when you press enter. Meaning shell executes you commands line by line, as you type them.



      On the other hand Visual Studio is not a shell environment, it is an IDE (editor). Which allows you to write the whole python program and then execute it all at once.






      share|improve this answer


























        1












        1








        1







        That is because, when you use the python shell. Shell is executing 5 + 5 when you press enter. Meaning shell executes you commands line by line, as you type them.



        On the other hand Visual Studio is not a shell environment, it is an IDE (editor). Which allows you to write the whole python program and then execute it all at once.






        share|improve this answer













        That is because, when you use the python shell. Shell is executing 5 + 5 when you press enter. Meaning shell executes you commands line by line, as you type them.



        On the other hand Visual Studio is not a shell environment, it is an IDE (editor). Which allows you to write the whole python program and then execute it all at once.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 28 '18 at 22:26









        ravish.hackerravish.hacker

        618917




        618917

























            1














            In the shell the "addition" is evaluated immediately.



            In the editor you have to write:



            print(5 + 5)


            You have to tell the program, that it should "print" something in the shell.



            More Examples:



            print("this will be printed")

            print("this is a" + "test")


            In the last example the second string is appended to the first one.



            For reference or learning Python






            share|improve this answer


























            • Well, whatever is typed is "evaluated", not "solved"

              – cricket_007
              Dec 28 '18 at 22:36


















            1














            In the shell the "addition" is evaluated immediately.



            In the editor you have to write:



            print(5 + 5)


            You have to tell the program, that it should "print" something in the shell.



            More Examples:



            print("this will be printed")

            print("this is a" + "test")


            In the last example the second string is appended to the first one.



            For reference or learning Python






            share|improve this answer


























            • Well, whatever is typed is "evaluated", not "solved"

              – cricket_007
              Dec 28 '18 at 22:36
















            1












            1








            1







            In the shell the "addition" is evaluated immediately.



            In the editor you have to write:



            print(5 + 5)


            You have to tell the program, that it should "print" something in the shell.



            More Examples:



            print("this will be printed")

            print("this is a" + "test")


            In the last example the second string is appended to the first one.



            For reference or learning Python






            share|improve this answer















            In the shell the "addition" is evaluated immediately.



            In the editor you have to write:



            print(5 + 5)


            You have to tell the program, that it should "print" something in the shell.



            More Examples:



            print("this will be printed")

            print("this is a" + "test")


            In the last example the second string is appended to the first one.



            For reference or learning Python







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 28 '18 at 22:36

























            answered Dec 28 '18 at 22:31









            robson90robson90

            112




            112













            • Well, whatever is typed is "evaluated", not "solved"

              – cricket_007
              Dec 28 '18 at 22:36





















            • Well, whatever is typed is "evaluated", not "solved"

              – cricket_007
              Dec 28 '18 at 22:36



















            Well, whatever is typed is "evaluated", not "solved"

            – cricket_007
            Dec 28 '18 at 22:36







            Well, whatever is typed is "evaluated", not "solved"

            – cricket_007
            Dec 28 '18 at 22:36




















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53964599%2fno-code-output-when-writing-statements-in-visual-studio%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            vYc H 8kDFKI2oml5ckftresA,B,fu9P0cEf2E5O3X7O5p0Pccd ZOTJFIv6,SC Ey n k7BXC p
            d mBQUqvMbsR7z 3NzN22RggifR y2vhZwyy vP0 Oe6AsRne,JGTDLkG3uUXksc8L1VD JQHZD9D,v1YV r9weSCVE O7rvYEG7

            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas