Simple python script will not run in Visual Studio 2017Should I add the Visual Studio .suo and .user files to source control?Terminating a Python scriptIs there a way to run Python on Android?How do I add an existing directory tree to a project in Visual Studio?Using Git with Visual StudioHow can you profile a Python script?How do I check what version of Python is running my script?.gitignore for Visual Studio Projects and SolutionsDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?Can you force Visual Studio to always run as an Administrator in Windows 8?

1kV DC Circuit - Insulation on ground wire?

Why do opposition parties not want an election?

I multiply the source, you (probably) multiply the output!

Supervisor wants me to support a diploma-thesis SW tool after I graduated

How do I write a vertically-stacked definition of a sequence?

Fantasy Military Arms and Armor: the Dwarven Grand Armory

Relationship between speed and cadence?

Could a British PM name the Opposition leader the next PM when they resign

Can you pop microwave popcorn on a stove?

Infinitely many primes

Python reimplementation of Lost In Space by Tim Hartnell

How strong is aircraft-grade spruce?

How do you say "to hell with everything" in French?

Male viewpoint in an erotic novel

If every star in the universe except the Sun were destroyed, would we die?

Does the word voltage exist in academic engineering?

How many attacks exactly do I get combining Dual Wielder feat with Two-Weapon Fighting style?

Did the Byzantines ever attempt to move their capital to Rome?

Draw the ☣ (Biohazard Symbol)

What exactly is Apple Cider

Template default argument loses its reference type

What makes an ending "happy"?

How to make a pipe-divided tuple?

What's in a druid's grove?



Simple python script will not run in Visual Studio 2017


Should I add the Visual Studio .suo and .user files to source control?Terminating a Python scriptIs there a way to run Python on Android?How do I add an existing directory tree to a project in Visual Studio?Using Git with Visual StudioHow can you profile a Python script?How do I check what version of Python is running my script?.gitignore for Visual Studio Projects and SolutionsDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?Can you force Visual Studio to always run as an Administrator in Windows 8?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I've just now installed visual studio 2017 for python coding. I'm pretty new to python. I was messing around with python in visual studio, and on my first .py file I've tried to create, it will not run in visual studio.



Opening up the .py in IDLE, it runs fine and works perfectly. In visual studio, a dialog pops up saying "press any key to continue..." and then closes. Debug output shows:



The thread 0x1 has exited with code 0 (0x0).
The program 'python.exe' has exited with code 0 (0x0).


The program would run in visual studio fine at first but randomly stopped, and after a reinstall of visual it still won't run.



The code for my program is:



def calculateMean(numbers):
sum = 0
for i in numbers:
sum += numbers
mean = sum / len(i)
return mean
def quadraticFormula(a,b,c):
numeratorRoot = ((b**2)-(4*a*c))**(1/2)
firstResult = ((b*-1)+numeratorRoot)/(2*a)
secondResult = ((b*-1)-numeratorRoot)/(2*a)
return firstResult,secondResult

if __name__ == "__main__":
first = int(input("pick a: "))
second = int(input("pick b: "))
third = int(input("pick c: "))
result1,result2 = quadraticFormula(first,second,third)
print("The results are: R1=0 R2=1".format(result1,result2))









share|improve this question


























  • Going to Debug and selecting "Execute file in python interactive" properly runs down in the output area. Still don't know why running it normally doesn't work

    – parsimony qwerty
    Mar 28 at 5:27

















2















I've just now installed visual studio 2017 for python coding. I'm pretty new to python. I was messing around with python in visual studio, and on my first .py file I've tried to create, it will not run in visual studio.



Opening up the .py in IDLE, it runs fine and works perfectly. In visual studio, a dialog pops up saying "press any key to continue..." and then closes. Debug output shows:



The thread 0x1 has exited with code 0 (0x0).
The program 'python.exe' has exited with code 0 (0x0).


The program would run in visual studio fine at first but randomly stopped, and after a reinstall of visual it still won't run.



The code for my program is:



def calculateMean(numbers):
sum = 0
for i in numbers:
sum += numbers
mean = sum / len(i)
return mean
def quadraticFormula(a,b,c):
numeratorRoot = ((b**2)-(4*a*c))**(1/2)
firstResult = ((b*-1)+numeratorRoot)/(2*a)
secondResult = ((b*-1)-numeratorRoot)/(2*a)
return firstResult,secondResult

if __name__ == "__main__":
first = int(input("pick a: "))
second = int(input("pick b: "))
third = int(input("pick c: "))
result1,result2 = quadraticFormula(first,second,third)
print("The results are: R1=0 R2=1".format(result1,result2))









share|improve this question


























  • Going to Debug and selecting "Execute file in python interactive" properly runs down in the output area. Still don't know why running it normally doesn't work

    – parsimony qwerty
    Mar 28 at 5:27













2












2








2








I've just now installed visual studio 2017 for python coding. I'm pretty new to python. I was messing around with python in visual studio, and on my first .py file I've tried to create, it will not run in visual studio.



Opening up the .py in IDLE, it runs fine and works perfectly. In visual studio, a dialog pops up saying "press any key to continue..." and then closes. Debug output shows:



The thread 0x1 has exited with code 0 (0x0).
The program 'python.exe' has exited with code 0 (0x0).


The program would run in visual studio fine at first but randomly stopped, and after a reinstall of visual it still won't run.



The code for my program is:



def calculateMean(numbers):
sum = 0
for i in numbers:
sum += numbers
mean = sum / len(i)
return mean
def quadraticFormula(a,b,c):
numeratorRoot = ((b**2)-(4*a*c))**(1/2)
firstResult = ((b*-1)+numeratorRoot)/(2*a)
secondResult = ((b*-1)-numeratorRoot)/(2*a)
return firstResult,secondResult

if __name__ == "__main__":
first = int(input("pick a: "))
second = int(input("pick b: "))
third = int(input("pick c: "))
result1,result2 = quadraticFormula(first,second,third)
print("The results are: R1=0 R2=1".format(result1,result2))









share|improve this question
















I've just now installed visual studio 2017 for python coding. I'm pretty new to python. I was messing around with python in visual studio, and on my first .py file I've tried to create, it will not run in visual studio.



Opening up the .py in IDLE, it runs fine and works perfectly. In visual studio, a dialog pops up saying "press any key to continue..." and then closes. Debug output shows:



The thread 0x1 has exited with code 0 (0x0).
The program 'python.exe' has exited with code 0 (0x0).


The program would run in visual studio fine at first but randomly stopped, and after a reinstall of visual it still won't run.



The code for my program is:



def calculateMean(numbers):
sum = 0
for i in numbers:
sum += numbers
mean = sum / len(i)
return mean
def quadraticFormula(a,b,c):
numeratorRoot = ((b**2)-(4*a*c))**(1/2)
firstResult = ((b*-1)+numeratorRoot)/(2*a)
secondResult = ((b*-1)-numeratorRoot)/(2*a)
return firstResult,secondResult

if __name__ == "__main__":
first = int(input("pick a: "))
second = int(input("pick b: "))
third = int(input("pick c: "))
result1,result2 = quadraticFormula(first,second,third)
print("The results are: R1=0 R2=1".format(result1,result2))






python visual-studio






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 6:13







parsimony qwerty

















asked Mar 28 at 5:19









parsimony qwertyparsimony qwerty

112 bronze badges




112 bronze badges















  • Going to Debug and selecting "Execute file in python interactive" properly runs down in the output area. Still don't know why running it normally doesn't work

    – parsimony qwerty
    Mar 28 at 5:27

















  • Going to Debug and selecting "Execute file in python interactive" properly runs down in the output area. Still don't know why running it normally doesn't work

    – parsimony qwerty
    Mar 28 at 5:27
















Going to Debug and selecting "Execute file in python interactive" properly runs down in the output area. Still don't know why running it normally doesn't work

– parsimony qwerty
Mar 28 at 5:27





Going to Debug and selecting "Execute file in python interactive" properly runs down in the output area. Still don't know why running it normally doesn't work

– parsimony qwerty
Mar 28 at 5:27












0






active

oldest

votes










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/4.0/"u003ecc by-sa 4.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%2f55390643%2fsimple-python-script-will-not-run-in-visual-studio-2017%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.




















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%2f55390643%2fsimple-python-script-will-not-run-in-visual-studio-2017%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







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해