7 Replies - 1280 Views - Last Post: 02 March 2013 - 10:01 AM Rate Topic: -----

#1 Rambo Waz Here  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 34
  • Joined: 27-June 11

python crashing

Posted 24 February 2013 - 05:56 AM

hey just got a small problem, after i've written my code and save it i press f5 to run the code and python freezes and crashes .... any idea how i can fix it.

edit: forgot to mention this is python 3.3 and i just downloaded it today aswell

This post has been edited by Rambo Waz Here: 24 February 2013 - 06:02 AM

Is This A Good Question/Topic? 0
  • +

Replies To: python crashing

#2 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3838
  • View blog
  • Posts: 13,595
  • Joined: 12-December 12

Re: python crashing

Posted 24 February 2013 - 06:13 AM

I suppose fixing your code would prevent it from crashing, but as I have no idea what your code is or which editor you are using I/we cannot offer any other assistance.
Was This Post Helpful? 0
  • +
  • -

#3 Mekire  Icon User is offline

  • D.I.C Head

Reputation: 117
  • View blog
  • Posts: 215
  • Joined: 11-January 13

Re: python crashing

Posted 24 February 2013 - 06:13 AM

Well as you said you are pressing F5 to run the code I'm guessing you are using IDLE and it is IDLE crashing rather than python (Python and IDLE are not the same thing as many people new to python think they are). You could try another IDE and see if that helps. If this isn't the case then provide a little more information. What kind of code are you trying to run? What OS are you on? etc.

-Mek

This post has been edited by Mekire: 24 February 2013 - 06:14 AM

Was This Post Helpful? 0
  • +
  • -

#4 Rambo Waz Here  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 34
  • Joined: 27-June 11

Re: python crashing

Posted 24 February 2013 - 06:24 AM

ok i will try another IDE.. but i was just doing some simple things like
a = 0
while a < 10:
a = a + 1
print (a)

This post has been edited by Rambo Waz Here: 24 February 2013 - 06:25 AM

Was This Post Helpful? 0
  • +
  • -

#5 Mekire  Icon User is offline

  • D.I.C Head

Reputation: 117
  • View blog
  • Posts: 215
  • Joined: 11-January 13

Re: python crashing

Posted 24 February 2013 - 06:31 AM

Well if that's actually what your code looks like then your indentation is wrong. Nonetheless this shouldn't crash your IDE (not even IDLE). It should just give you an error.

a = 0
while a < 10:
    a = a + 1
    print (a)


-Mek
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3838
  • View blog
  • Posts: 13,595
  • Joined: 12-December 12

Re: python crashing

Posted 24 February 2013 - 06:32 AM

That will loop indefinitely, and I assume you meant:

a = 0
while a < 10:
    a = a + 1
    print (a)

The first thing that your book or tutorial should tell you is about the importance of indenting in Python.

Mekire beat me to it :)

This post has been edited by andrewsw: 24 February 2013 - 06:33 AM

Was This Post Helpful? 0
  • +
  • -

#7 Rambo Waz Here  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 34
  • Joined: 27-June 11

Re: python crashing

Posted 24 February 2013 - 06:38 AM

sorry .. it is indented i just didnt know how to do it on the forum ... :/

(i presume tab?)

This post has been edited by Rambo Waz Here: 24 February 2013 - 06:38 AM

Was This Post Helpful? 0
  • +
  • -

#8 Dietrich  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 02-March 13

Re: python crashing

Posted 02 March 2013 - 10:01 AM

Works well on ...
http://ideone.com/ecZD6O
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1